From d6db24800467ad3a83d37231c11966ca7cb2e9ae Mon Sep 17 00:00:00 2001 From: Loic Bersier Date: Tue, 18 Sep 2018 20:27:49 +0200 Subject: [PATCH] Removed music/assignrank --- .gitignore | 3 ++- commands/admin/assignrank.js | 36 ----------------------------- commands/fun/music | 44 ------------------------------------ commands/fun/say.js | 1 - 4 files changed, 2 insertions(+), 82 deletions(-) delete mode 100644 commands/admin/assignrank.js delete mode 100644 commands/fun/music diff --git a/.gitignore b/.gitignore index e1bad3e6..4315938b 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ package-lock.json package.json .DS_Store node_modules -node_modules\ \ No newline at end of file +node_modules\ +.vscode \ No newline at end of file diff --git a/commands/admin/assignrank.js b/commands/admin/assignrank.js deleted file mode 100644 index 4484896e..00000000 --- a/commands/admin/assignrank.js +++ /dev/null @@ -1,36 +0,0 @@ -const { Command } = require('discord.js-commando'); -module.exports = class AssignRankCommand extends Command { - constructor(client) { - super(client, { - name: 'assignrank', - group: 'admin', - memberName: 'assignrank', - description: 'Assign a rank to the mentionned user', - clientPermissions: ['MANAGE_ROLES'], - userPermissions: ['MANAGE_ROLES'], - guildOnly: true, - args: [ - { - key: 'member', - prompt: 'Wich member should get the rank', - type: 'member', - }, - { - key: 'rank', - prompt: 'Wich rank to give to the user?', - type: 'string', - } - ] - }); - } - - async run(message, { rank, member }) { - const role = message.guild.roles.find('name', rank); - member = message.mentions.members.first(); - if (!role) { - message.say("The rank you tried to assign dosent exist ( or bot have a lower rank than the one you tried to assign"); - } else - member.addRole(role); - message.say(`You successfully gived the rank **${rank}** to **${member}**`); - } -}; \ No newline at end of file diff --git a/commands/fun/music b/commands/fun/music deleted file mode 100644 index 49ce0652..00000000 --- a/commands/fun/music +++ /dev/null @@ -1,44 +0,0 @@ -const { Command } = require('discord.js-commando'); -const ytdl = require('ytdl-core'); -module.exports = class MusicCommand extends Command { - constructor(client) { - super(client, { - name: 'music', - aliases: ['play'], - group: 'fun', - memberName: 'music', - description: 'Play youtube link in vocal', - guildOnly: true, - args: [ - { - key: 'ytblink', - prompt: 'Wich Youtube link would you like to play? (default: despacito)\nTo stop the bot just do "haha music stop"', - type: 'string', - default: 'https://www.youtube.com/watch?v=kJQP7kiw5Fk' - } - ] - }); - } - - async run(message, { ytblink, repeat }) { - const { voiceChannel } = message.member; - -// If not in voice channel ask user to join - if (!voiceChannel) { - return message.reply('please join a voice channel first!'); - - } else -// If user say "stop" make the bot leave voice channel - if (ytblink == 'stop') { - voiceChannel.leave() - message.say('I leaved the channel'); - } else - voiceChannel.join().then(connection => { - const stream = ytdl(ytblink, { filter: 'audioonly' }); - const dispatcher = connection.playStream(stream); -// End at then end of the audio stream - dispatcher.on('end', () => voiceChannel.leave()); - message.say('Music ended, Leaved the channel'); - }); - } - } \ No newline at end of file diff --git a/commands/fun/say.js b/commands/fun/say.js index a6536fb5..e8425da6 100644 --- a/commands/fun/say.js +++ b/commands/fun/say.js @@ -1,5 +1,4 @@ const { Command } = require('discord.js-commando'); -const responseObject = require("../../randVid.json"); module.exports = class sayCommand extends Command { constructor(client) { super(client, {