|
|
Joined: May 2015
Posts: 133
Vogon poet
|
OP
Vogon poet
Joined: May 2015
Posts: 133 |
All, before a ton of posts get made here to ask why their resubs no longer are being seen, you can read about it here: https://discuss.dev.twitch.tv/t/important-re-subscription-change/6463 I have the following code to account for this change (credit goes to JACKY1356400) : raw USERNOTICE:*:{
if ($msgtags(room-id).key == [CHANNEL ID HERE]) {
if ($2- == $null) && (resub isin $msgtags) {
msg $1 Welcome back $msgtags(display-name).key has resubscribed for $msgtags(msg-param-months).key months in a row!
}
else {
msg $1 Welcome back $msgtags(display-name).key has resubscribed for $msgtags(msg-param-months).key months in a row with the message $2-
}
}
} You'll need to get your room-id, i recommend debugging @raw and pulling the ID. Run the following: //window -e @raw | debug @raw Then change your key in the referenced code.
twitter @keyeslol
|
|
|
|
Joined: Jun 2014
Posts: 77
Babel fish
|
Babel fish
Joined: Jun 2014
Posts: 77 |
Hey @keyeslol, So to get the Room-ID would be something as this? on *:TEXT:!roomid *:#: { if ($nick == $me) { .timermsg 1 1 /msg # Room ID: $msgtags(room-id).key } }
|
|
|
|
Joined: May 2015
Posts: 133
Vogon poet
|
OP
Vogon poet
Joined: May 2015
Posts: 133 |
You can get it by putting this in a new remotes: on *:TEXT:*:#: {
if ($nick == $me) {
msg # Room ID: $msgtags(room-id).key
}
}
twitter @keyeslol
|
|
|
|
Joined: Jun 2014
Posts: 77
Babel fish
|
Babel fish
Joined: Jun 2014
Posts: 77 |
Hi @keyeslol,
With this, the bot would have to be able to pick up the "Room-ID" of each channel automatically?
|
|
|
|
Joined: May 2015
Posts: 133
Vogon poet
|
OP
Vogon poet
Joined: May 2015
Posts: 133 |
That is correct. Just have the bot type anything in the channel you need the room-id for.
We could technically do this all automatically, write this to a var, like %roomid. < key > .channel and call this in our resub.
Instead of the room-id == [ ID HERE ] it would be room-id == %room.id
I'd have to write the code though to do it all automatically. But here's the thing, i wouldn't want to process the on * event all the time, as i only need the room ID once.
Better to just grab it once, instead of writing the ID to a var.
twitter @keyeslol
|
|
|
|
Joined: Jun 2014
Posts: 77
Babel fish
|
Babel fish
Joined: Jun 2014
Posts: 77 |
Something like this works? I apologize if you have errors and ask many questions, it's just I'm new to mIRC. Original: raw USERNOTICE:*:{ if ($msgtags(room-id).key == [CHANNEL ID HERE]) { if ($2- == $null) && (resub isin $msgtags) { msg $1 Welcome back $msgtags(display-name).key has resubscribed for $msgtags(msg-param-months).key months in a row! } else { msg $1 Welcome back $msgtags(display-name).key has resubscribed for $msgtags(msg-param-months).key months in a row with the message $2- } } } Example edited script: raw USERNOTICE:*:{ if ($chan == #channame && ( $msgtags(msg-id).key == resub)) {
|
|
|
|
Joined: May 2015
Posts: 133
Vogon poet
|
OP
Vogon poet
Joined: May 2015
Posts: 133 |
No need to check if $chan == xxx && room-id == xxx
room-id is unique, and only for the channel the resub occurs in. Use my original code, and reference the room-id where it says [channel id]
twitter @keyeslol
|
|
|
|
Joined: Jun 2014
Posts: 77
Babel fish
|
Babel fish
Joined: Jun 2014
Posts: 77 |
Well thank you very much for all the information and help @keyeslol. Very thankful.
|
|
|
|
Joined: Apr 2015
Posts: 42
Ameglian cow
|
Ameglian cow
Joined: Apr 2015
Posts: 42 |
@keyeslol So this one should work fine then? I've put "#yznb", because I only want it to type in that channel, since I'm connected to more than 1 in IRC.
raw USERNOTICE:*:#yznb:{
if ($msgtags(room-id).key == [31582993]) {
if ($2- == $null) && (resub isin $msgtags) {
msg $1 xanHY xanPE yznSOLD (ノ◕ヮ◕)ノ ✧ ( $+ $msgtags(display-name).key $+ ) stayed on #YZNARMY for ( $+ $msgtags(msg-param-months).key $+ ) months! yznLOVE yznHYPE
}
else {
msg $1 xanHY xanPE yznSOLD (ノ◕ヮ◕)ノ ✧ ( $+ $msgtags(display-name).key $+ ) stayed on #YZNARMY for ( $+ $msgtags(msg-param-months).key $+ ) months! yznLOVE yznHYPE ( Note: $2- )
}
}
}
|
|
|
|
Joined: May 2015
Posts: 133
Vogon poet
|
OP
Vogon poet
Joined: May 2015
Posts: 133 |
You don't need to put the channel in, as the room-id is unique to the channel the resub occurs in. IE, it won't display in any other channel than the one the room-id is tied to. But it doesn't hurt if you want to have it in there. Technically it saves a minuscule amount of CPU. @keyeslol So this one should work fine then? I've put "#yznb", because I only want it to type in that channel, since I'm connected to more than 1 in IRC.
raw USERNOTICE:*:#yznb:{
if ($msgtags(room-id).key == [31582993]) {
if ($2- == $null) && (resub isin $msgtags) {
msg $1 xanHY xanPE yznSOLD (ノ◕ヮ◕)ノ ✧ ( $+ $msgtags(display-name).key $+ ) stayed on #YZNARMY for ( $+ $msgtags(msg-param-months).key $+ ) months! yznLOVE yznHYPE
}
else {
msg $1 xanHY xanPE yznSOLD (ノ◕ヮ◕)ノ ✧ ( $+ $msgtags(display-name).key $+ ) stayed on #YZNARMY for ( $+ $msgtags(msg-param-months).key $+ ) months! yznLOVE yznHYPE ( Note: $2- )
}
}
}
twitter @keyeslol
|
|
|
|
Joined: Apr 2015
Posts: 42
Ameglian cow
|
Ameglian cow
Joined: Apr 2015
Posts: 42 |
You don't need to put the channel in, as the room-id is unique to the channel the resub occurs in. IE, it won't display in any other channel than the one the room-id is tied to. But it doesn't hurt if you want to have it in there. Technically it saves a minuscule amount of CPU. @keyeslol So this one should work fine then? I've put "#yznb", because I only want it to type in that channel, since I'm connected to more than 1 in IRC.
raw USERNOTICE:*:#yznb:{
if ($msgtags(room-id).key == [31582993]) {
if ($2- == $null) && (resub isin $msgtags) {
msg $1 xanHY xanPE yznSOLD (ノ◕ヮ◕)ノ ✧ ( $+ $msgtags(display-name).key $+ ) stayed on #YZNARMY for ( $+ $msgtags(msg-param-months).key $+ ) months! yznLOVE yznHYPE
}
else {
msg $1 xanHY xanPE yznSOLD (ノ◕ヮ◕)ノ ✧ ( $+ $msgtags(display-name).key $+ ) stayed on #YZNARMY for ( $+ $msgtags(msg-param-months).key $+ ) months! yznLOVE yznHYPE ( Note: $2- )
}
}
}
Oh alright. I tried using this earlier today but it didn't quite seem to be working anyway. Do I need to make a whole new Remote script for this, and restart mIRC after writing it in?
|
|
|
|
Joined: May 2015
Posts: 133
Vogon poet
|
OP
Vogon poet
Joined: May 2015
Posts: 133 |
Try taking out the brackets after room-id.key ==
twitter @keyeslol
|
|
|
|
Joined: Jun 2016
Posts: 1
Mostly harmless
|
Mostly harmless
Joined: Jun 2016
Posts: 1 |
I'm guessing that I need to do raw CAP REQ :twitch.tv/tags. But when I do it, my bot wont get any of the chat messages from twitch. Do I need to add/do a script to capture chat or something?
|
|
|
|
Joined: Jun 2014
Posts: 77
Babel fish
|
Babel fish
Joined: Jun 2014
Posts: 77 |
Hey @Artiiz, Actually in the Room-ID is not going " [ ]" or the bot will not respond you, at least in my case did not. raw USERNOTICE:*:#yznb:{ if ($msgtags(room-id).key == 31582993) { if ($2- == $null) && (resub isin $msgtags) { msg $1 xanHY xanPE yznSOLD (ノ◕ヮ◕)ノ ✧ ( $+ $msgtags(display-name).key $+ ) stayed on #YZNARMY for ( $+ $msgtags(msg-param-months).key $+ ) months! yznLOVE yznHYPE } else { msg $1 xanHY xanPE yznSOLD (ノ◕ヮ◕)ノ ✧ ( $+ $msgtags(display-name).key $+ ) stayed on #YZNARMY for ( $+ $msgtags(msg-param-months).key $+ ) months! yznLOVE yznHYPE ( Note: $2- ) } } }
|
|
|
|
Joined: Jun 2016
Posts: 1
Mostly harmless
|
Mostly harmless
Joined: Jun 2016
Posts: 1 |
Hi im a little bit confused. i used the following script for new subs and resubs and it worked great. Now with the changes sometimes it works, sometimes it doesnt. Appreciate any help for a solution.
ON *:TEXT:*subscribed*:#channelname:{
if ( $nick == twitchnotify ) && ($istok($1-,subscribed to,32)) halt
elseif ($nick == twitchnotify) && ( $4 == $null ) { describe $chan Welcome $1! RANDOM MSG }
elseif ($nick == twitchnotify) && ( $4 isnum ) { describe $chan Wow! $1 Welcome $1! RANDOM MSG }
}
|
|
|
|
Joined: Apr 2016
Posts: 86
Babel fish
|
Babel fish
Joined: Apr 2016
Posts: 86 |
If the channel name is removed and automatically recognized....I don't understand how it'll work if your bot is connect to multiple Twitch partner's chat??
|
|
|
|
Joined: May 2015
Posts: 133
Vogon poet
|
OP
Vogon poet
Joined: May 2015
Posts: 133 |
I'm guessing that I need to do raw CAP REQ :twitch.tv/tags. But when I do it, my bot wont get any of the chat messages from twitch. Do I need to add/do a script to capture chat or something? What version of mIRC are you using? I'm using the latest, and requesting the following: raw CAP REQ :twitch.tv/membership
raw CAP REQ :twitch.tv/tags
raw CAP REQ :twitch.tv/commands Chat messages appear just fine for me.
twitter @keyeslol
|
|
|
|
Joined: May 2015
Posts: 133
Vogon poet
|
OP
Vogon poet
Joined: May 2015
Posts: 133 |
Take out the last line of your code and use the new code. Hi im a little bit confused. i used the following script for new subs and resubs and it worked great. Now with the changes sometimes it works, sometimes it doesnt. Appreciate any help for a solution.
ON *:TEXT:*subscribed*:#channelname:{
if ( $nick == twitchnotify ) && ($istok($1-,subscribed to,32)) halt
elseif ($nick == twitchnotify) && ( $4 == $null ) { describe $chan Welcome $1! RANDOM MSG }
elseif ($nick == twitchnotify) && ( $4 isnum ) { describe $chan Wow! $1 Welcome $1! RANDOM MSG }
}
twitter @keyeslol
|
|
|
|
Joined: May 2015
Posts: 133
Vogon poet
|
OP
Vogon poet
Joined: May 2015
Posts: 133 |
It works because you'll specify unique room-ids for the channels your bot is connected to. Room-id's are unique to each room. We were talking about how to auto populate the room-id variable in the above code. However, the bots I've coded/managed do not do it this way. I've grabbed them once and set them. If the channel name is removed and automatically recognized....I don't understand how it'll work if your bot is connect to multiple Twitch partner's chat??
twitter @keyeslol
|
|
|
|
Joined: Jun 2016
Posts: 8
Nutrimatic drinks dispenser
|
Nutrimatic drinks dispenser
Joined: Jun 2016
Posts: 8 |
I know this section may have been forgotten and this may or may not be such a basic question, but whenever I add multiple messages to the script it doesn't come through, I use the $msg #chan Blah blah and it does make extra chat lines, help would be greatly appreciated. Thank you!
|
|
|
|
|
|