Giter Site home page Giter Site logo

Comments (6)

TiotBenjy avatar TiotBenjy commented on September 26, 2024 1

Hello,

Sorry I've forgotten to reply to your comment, yes it works ! Thanks for your help.

Have a great day.

from tesjs.

mitchwadair avatar mitchwadair commented on September 26, 2024

Hi! Could you please show how you are subscribing to the event?

from tesjs.

TiotBenjy avatar TiotBenjy commented on September 26, 2024

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);
});

from tesjs.

mitchwadair avatar mitchwadair commented on September 26, 2024

Looks like your condition for the raid subscription is incorrect. You'll need either from_broadcaster_user_id or to_broadcaster_user_id (or maybe both) depending on what you are trying to accomplish with your event handler. Let me know if that fixes your problem!

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

from tesjs.

mitchwadair avatar mitchwadair commented on September 26, 2024

@TiotBenjy did this solve your problem? I'll be closing this if it did, or if I do not hear back soon 👍

from tesjs.

mitchwadair avatar mitchwadair commented on September 26, 2024

Great! Happy to help 🙂

from tesjs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.