• If you need help or want to discuss things, you now can also join us on our Discord Server!
  • A first preview of the unlimited version of SinusBot can be found in the Upcoming Changes thread. A version for Windows will follow, but we don't have a release date, yet.

EN Channel Update Error

Status
Not open for further replies.

arlextra

Member
Hello, I have a problem with the channel update. "chatChannel" works but "channelUpdate" gives me an error in the console. What I have done wrong ?

Code:
        if (config.type == 0) {
            channelUpdate({ id: 7815, name: 'yolo2' });
            chatChannel(ads[ad]);
        } else {
            chatServer(ads[ad]);
            channelUpdate({ id: 7815, name: 'yolo2' });
        }

Error:
Code:
2015/09/01 21:01:32 5181f08d befb8910 WARN   TypeError: Cannot access member 'id' of undefined
 

Xuxe

Containerholic
Staff member
is awesome!
V.I.P.
Contributor
Insider
channelUpdate
Gets called whenever a channel gets updated (codecs, title & such.)

This is bound to a event, not a function to change your channel options. Correct me if i wrong.

// EDIT:

My fail, also a function to Update the options:

channelUpdate(channelId, channelParams)
Updates a channel

You have to call it so: channelUpdate(7815, {name:'test'});

I have not tested it yet.

Documentation: https://www.sinusbot.com/scripts/scripting3.html
 
Last edited:
Status
Not open for further replies.
Top