• 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 Help with a script error

Status
Not open for further replies.

Vicreaft

Member
So i come up with this script, to change the current channel name buy "[Musique] - trackname".
Since i was not able to find how to detect the channel id in the track options, i directly pu the channel id. But it is not working. Any ideas why?
Code:
registerPlugin({
    name: "Channel Music Name",
    version: "1.0",
    description: "Change the current channel name to the music one",
    author: "Vicreaft",
    vars: {}
}, function(sinusbot, config) {
    sinusbot.on("track", function(ev) {
      var parts = ev.msg.split(' ');
          var cmd = parts.shift();
        if(ev.title < 25) {
             sinusbot.channelUpdate(435235, { name: "[Musique] - " + track.title });
        }       
    });
});
 
Status
Not open for further replies.
Top