• 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 Clients rights while playing music

ddreamer

Active Member
Hello
I would like that while a piece of music is played via the bot, the talk power is withdrawn from the users. After completion, the rights should be given back.
Does anyone know how I can implement this?
 

ddreamer

Active Member
Thx for the hint.
I do:
Code:
var channel = backend.getCurrentChannel();
            channel.update({
                topic: 'Gateway-Kanal 1 - DARC playback..',
                neededTalkPower: 5000,
            });
            engine.log('Set temp. Channel-Permissions');
            media.playURL(track.URL);
            engine.log('PLAY MUSIC "' + track.Title + '"');

... and check ...

Code:
event.on('trackEnd', function (ev) {
        var channel = backend.getCurrentChannel();
            channel.update({
                topic: 'Gateway-Kanal 1',
                neededTalkPower: 10,
            });
    };

It works, but i'll make it better organized ... via config
 
Top