• 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.

Bug setDescription not working on lastest version

Status
Not open for further replies.

xDefcon

Well-Known Member
Contributor
Used version: lastest beta 0.9.10 for linux
OS: Centos 7

Description: On the previous version a simple script to set as description the current track info works. On the lastest 0.9.10 i can't see anything in console (also when log level is 10) and the script does not work anymore.

The script is the following:
Code:
registerPlugin({
    name: 'name',
    version: '1.0',
    description: 'desc',
    author: 'xDefcon',
    vars: {}
},
function(sinusbot, config) {
    sinusbot.on('track', function(ev) {
        var track = getTrack();
        if (!track) return;
        var tit = track.title;
        setDescription(tit);
    });
});
 

kapabac

Active Member
Contributor
Insider
var track = getTrack();
Change to
var track = sinusbot.getCurrentTrack();
;)
 

xDefcon

Well-Known Member
Contributor
Thanks, where can i find documentation to update all my scripts?

i need also help for setNick(); is maybe sinusbot.setNick()?

EDIT: sinusbot.setNick() worked.


@kapabac
 
Last edited:

xDefcon

Well-Known Member
Contributor
Where can i find new documentation?
@kapabac you have to update for beta version, your script is written with setDescription, and it does not allow users to change their relative message ("playing >/Stopped []") because you used "substring" to get the symbol.
Add message as customizable variable.
 
Status
Not open for further replies.
Top