• If you need help or want to discuss things, you now can also join us on our Discord Server!
  • Happy New Year everyone! A new version (1.0.0-beta.16) is out for Linux, fixing an issue that could lock the bot up when using it with TS3. Please visit the resources section or the main page (https://www.sinusbot.com) for the new package.

EN Clients rights while playing music

ddreamer

Donor
is awesome!
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

Donor
is awesome!
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