Deprecated: Use of "parent" in callables is deprecated in /var/www/html/forum/src/vendor/league/flysystem-eventable-filesystem/src/EventableFilesystem.php on line 431
  • 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 avatar auto delete

Status
Not open for further replies.

Schaeffer

Donor
is awesome!
Operating System: Linux
SinusBot Version: 0.9.18-8499d2c
TS3 Version: 3.0.18

Problem Description
As soon as we met the avatar by default it disappeared automatically at the end of 5 seconds


Code:
registerPlugin({
    name: 'Covatar - Cover 2 Avatar V2',
    version: '1.0',
    description: 'This script will set the avatar from the cover info of the current track.',
    author: 'Michael Friese <[email protected]> and Etsukazu Aoi <[email protected]>',
    vars: {}
}, function(sinusbot, config) {
    sinusbot.on('track', function(ev) {
        if (!ev.thumbnail){
            sinusbot.downloadTrackThumbnail(ev.uuid,'http://i40.tinypic.com/t6dno2.jpg');
        }
        if (!sinusbot.setAvatarFromTrack()) {
            sinusbot.setDefaultAvatar();
        }
    });
   
    sinusbot.on('trackEnd', function(ev) {
        sinusbot.setDefaultAvatar();
    });
   
});
 
Status
Not open for further replies.
Top