From 79a53ecb030b457b3befaa1d6a88630a29fe5a35 Mon Sep 17 00:00:00 2001 From: MatteZ02 <47610069+MatteZ02@users.noreply.github.com> Date: Thu, 14 Nov 2019 20:23:51 +0200 Subject: [PATCH] added songselection setting --- commands/settings.js | 1 + commands/settings/songSelection.js | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 commands/settings/songSelection.js diff --git a/commands/settings.js b/commands/settings.js index 07aa6ae6..cde5a8ee 100644 --- a/commands/settings.js +++ b/commands/settings.js @@ -13,6 +13,7 @@ module.exports = { .addField('permissions', 'Change whether to require permissions to use eg `skip, stop, pause, loop, etc...`', true) .addField('setdj', 'Set a DJ role. This will allow chosen users to freely use all Musix commands. This will automatically set the `permissions` settings to true in order for the `DJ` role to have effect!', true) .addField('announcesongs', 'Whether to announce songs that start playing or not.') + .addField('songselection', 'Will i ask to select a song from the top 10 queries or start playing the first result instantly.') .setFooter(`how to use: ${prefix}settings `) .setAuthor(client.user.username, client.user.displayAvatarURL) .setColor('#b50002') diff --git a/commands/settings/songSelection.js b/commands/settings/songSelection.js new file mode 100644 index 00000000..0e22ce5c --- /dev/null +++ b/commands/settings/songSelection.js @@ -0,0 +1,12 @@ +module.exports = { + name: 'songselection', + async execute(message, args, client, Discord, prefix) { + if (!client.global.db.guilds[message.guild.id].dj) { + message.channel.send(':white_check_mark: Songselection now set to `true`!'); + client.global.db.guilds[message.guild.id].dj = true; + } else { + client.global.db.guilds[message.guild.id].dj = false; + message.channel.send(':white_check_mark: Songselection now set to `false`'); + } + } +}; \ No newline at end of file