• 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 Edit main commands

Greency

New Member
Hello!
I want to edit main comand, exactly !qytdl so that it search first in yt and then play this. I know how to write it but i dont know which file i need to edit.
I think editing in file sinusbot-commands.js is not what I need. I dont see here anything what is reading line in TeamSpeak. This is how it looks:

command.createCommand('qytdl')
.addArgument(command.createArgument('string').setName('url'))
.help('Download and enqueue <url> via youtube-dl')
.manual('Enqueues <url> via external youtube-dl (if enabled); beware: the file will be downloaded first and played back afterwards, so there might be a slight delay before playback starts; additionally, the file will be stored.')
.checkPermission(requirePrivileges(PLAYBACK|UPLOAD_FILE, ENQUEUE|UPLOAD_FILE))
.exec((client, args, reply, ev) => {
// print syntax if no url given
if (!args.url) {
reply(USAGE_PREFIX + 'qytdl <url>');
return;
}

if (!media.enqueueYtdl(stripURL(args.url))) {
reply(ERROR_PREFIX + 'Invalid URL.');
return;
}
successReaction(ev, reply);
});
 
Top