-
-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] can't subscribe to raid event #51
Comments
Hi! Could you please show how you are subscribing to the event? |
Yes sure ! There is the code : tes.on('channel.raid', async (event) => {
// my code when the event is triggered
});
// create a new subscription for the 'channel.raid' event for broadcaster
tes.subscribe('channel.raid', {
broadcaster_user_id: 12345678
}).then(_ => {
console.log("Subscribed to channel.raid event");
}).catch(err => {
console.log("RAID SUBSCRIBE ERROR");
console.log(err);
}); |
Looks like your condition for the raid subscription is incorrect. You'll need either As a side note, if that is the problem, I am intending to improve intellisense on conditions with #39. I should also probably try to improve the error handling/messaging here since it isn't immediately obvious what the source of the error is |
@TiotBenjy did this solve your problem? I'll be closing this if it did, or if I do not hear back soon 👍 |
Hello, Sorry I've forgotten to reply to your comment, yes it works ! Thanks for your help. Have a great day. |
Great! Happy to help 🙂 |
Describe the bug
We can't subscribe to raid event
To Reproduce
Steps to reproduce the behavior:
TypeError: Cannot read properties of undefined (reading '0')
at EventManager.queueSubscription (/www/wwwroot/xxxxxxx/node_mjs/lib/events.js:49:42)
at /www/wwwroot/bot.jesuiskristoff.fr/xxxxxx/tesjs/lib/tes.js:180:38
at runMicrotasks ()
at processTicksAndRejections (node:internal/process/task_queues:96:5)
Expected behavior
If it is possible fix the issue
Environment:
The text was updated successfully, but these errors were encountered: