Custom Twitch Bot and Twitch / commands

Hello

i am working on a custom twitch bot for a while

but now im looking to add the default twitch / commands in to my bot

so for example the new /announce command

is there anyway i can make my bot fire this instead of me or a mod
or is this not possible

because it will be nice to run this command on a timer for example we plan a event and the bot can announce this during the stream by executing the /announce command

PS i am using TMI/Node

Thank you in advance

The user account you intend to run your bot as, would need to be a moderator in your channel, as only moderators and broadcasters can send announcements.

Then just start your message in the PRIVMSG with an .announce or /announce (I prefer the dot version). This works the same as if a moderator or caster would send an announcement when using native twitch chat.

Chat or bot you both write .announce the message you wish to announce

2 Likes

sorry for the late responds i know for sure that the /announe doesnt work i tryed this and i literly just typed /announce giveaway starting next week

didnt see the announcement in any way or form

this is how im running the timed event
and as you can see on the Screenshots with both its not triggering the New /announce

client.on(‘connected’, (address, port) => {
setInterval(function(){
console.log(client.action(process.env.CHANNEL_TOKEN, ‘.announce New giveaway is starting next week’));
}, 723000000);
});

You’re doing an action not a normal message.

To add to WLG3R’s note

this sent

PRIVMSG #channelname :/me .announce New giveaway is starting next week

Since you used client.action (guessing TMI.js here). I guess you want the other “normal” chat message helper function that TMI.js has (client.say ?)

Thank you so much changed it to this and that worked

client.on(‘connected’, (address, port) => {
setInterval(function(){
client.say(process.env.CHANNEL_TOKEN, ‘/announce New giveaway is starting next week’)
}, 895000000);
});

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.