When I use a command or something is typed that is set to trigger a command, the bot outputs in the program (mIRC) but not in the Twitch chat. I have tried researching, but haven’t found an answer or anybody who has had the same exact problem.
I also had a bot output a message when somebody subscribed, and I used “describe” and also tried “msg”. It ended up showing up in the twitch.tv window instead of the chat window. Here is my code:
on 1:TEXT:*subscribed*:#a_jaxx:{
if ( $nick == twitchnotify ) && ($istok($1-,subscribed to,32)) halt
elseif ($nick == twitchnotify) && ( $4 == $null ) { msg $chan jaxxSub jaxxHearts jaxxSub jaxxSub jaxxHearts jaxxSub jaxxSub jaxxHearts jaxxSub jaxxSub jaxxHearts jaxxSub jaxxHearts jaxxSub jaxxHearts jaxxSub jaxxHearts jaxxSub THANKS FOR SUBBING $1! YOU ARE AMAZING!! }
elseif ($nick == twitchnotify) && ( $4 isnum ) { msg $chan jaxxSub jaxxHearts jaxxSub jaxxSub jaxxHearts jaxxSub jaxxSub jaxxHearts jaxxSub jaxxSub jaxxHearts jaxxSub jaxxHearts jaxxSub jaxxHearts jaxxSub jaxxHearts jaxxSub <3 YO! $1, THANKS FOR SUBBING FOR $4 MONTHS IN A ROW! }
}
on 1:TEXT:*slap me*:#a_jaxx:{
{ msg $chan *SLAP* I slapped you! }
}
on *:TEXT:!test:#: { msg $chan Your bot is working! }
I don’t have a lot of background in making bots with mIRC. I do know that mIRC sometimes doesn’t pick up changes to your commands file without a restart. Save the file and restart mIRC to make sure the changes are being applied.
Do all commands fail? And are you connected using an OAuth token with the correct scope?
I forget exactly what the user level 1 is. I’d make sure that it first works with this:
on *:text:*:#a_jaxx: {
Small thing, that you will later appreciate is to not format your code with { foobar }, and instead put your braces at the end of the top line, and below your code, instead of wrapping how you have it now. https://en.wikipedia.org/wiki/Programming_style
I also remember vaguely that you can type /window @debug in order to open a debug window. This should print out the raw IRC data for further inspection. Can you paste it here?
I was gonna say make sure the channel name you join is in all-lowercase, but now I can’t even receive messages typed in Webchat when I do that, so I’m not sure how your bot would have tried to respond in the first place. Still something to look out for though.
Using mIRC, is causes problems if you break the command and continue it on the next line, so to make it work best, I kept it all on one line. When I usually code, I break it up more.
Can you change the test command to this on *:TEXT:!test:#: { timer 1 2 msg $chan Your bot is working! }
and see if that works? Also make sure you’re joining the channel with lower cased channelname.