diff options
| author | 8cy <[email protected]> | 2020-04-07 10:38:48 -0700 |
|---|---|---|
| committer | 8cy <[email protected]> | 2020-04-07 10:38:48 -0700 |
| commit | 1885ab12c73c7a79a2e7d1a8055f9bd2b0a7f71b (patch) | |
| tree | 67f050cc81dea4b9b21f0d0349ecbdb263ecf221 /commands | |
| parent | port all the stuff from app.js to commands/ (diff) | |
| download | s5nical-1885ab12c73c7a79a2e7d1a8055f9bd2b0a7f71b.tar.xz s5nical-1885ab12c73c7a79a2e7d1a8055f9bd2b0a7f71b.zip | |
final test push before master
Diffstat (limited to 'commands')
| -rw-r--r-- | commands/8ball.js | 2 | ||||
| -rw-r--r-- | commands/abee.js | 12 | ||||
| -rw-r--r-- | commands/botstatus.js | 15 | ||||
| -rw-r--r-- | commands/clear.js | 2 | ||||
| -rw-r--r-- | commands/commands.js | 2 | ||||
| -rw-r--r-- | commands/dm.js | 8 | ||||
| -rw-r--r-- | commands/emoji.js | 2 | ||||
| -rw-r--r-- | commands/fart.js | 18 | ||||
| -rw-r--r-- | commands/help.js | 2 | ||||
| -rw-r--r-- | commands/join.js | 2 | ||||
| -rw-r--r-- | commands/leave.js | 2 | ||||
| -rw-r--r-- | commands/membercount.js | 2 | ||||
| -rw-r--r-- | commands/ping.js | 2 | ||||
| -rw-r--r-- | commands/psycho.js | 25 | ||||
| -rw-r--r-- | commands/quote.js | 2 | ||||
| -rw-r--r-- | commands/reboot.js | 2 | ||||
| -rw-r--r-- | commands/say.js | 2 | ||||
| -rw-r--r-- | commands/server.js | 2 | ||||
| -rw-r--r-- | commands/squeak.js | 4 | ||||
| -rw-r--r-- | commands/uhhhh.js | 4 | ||||
| -rw-r--r-- | commands/wahoo.js | 4 |
21 files changed, 80 insertions, 36 deletions
diff --git a/commands/8ball.js b/commands/8ball.js index e8e3e4a..e865176 100644 --- a/commands/8ball.js +++ b/commands/8ball.js @@ -16,4 +16,4 @@ module.exports = { msg.channel.send(RichEmbed = emb); } -}
\ No newline at end of file +};
\ No newline at end of file diff --git a/commands/abee.js b/commands/abee.js index c665b12..f46a06b 100644 --- a/commands/abee.js +++ b/commands/abee.js @@ -1,11 +1,15 @@ +const ytdl = require('ytdl-core'); + module.exports = { name: 'abee', - aliases: ['a-bee'], description: '', - async execute(msg) { + async execute(msg, args, bot) { if (msg.member.voiceChannel && !msg.guild.voiceConnection) { const connection = await msg.member.voiceChannel.join(); - const dispatcher = connection.playFile('./assets/audio/mario_on_a_bike.mp3', { + const stream = ytdl('https://www.youtube.com/watch?v=lvdnhWhQBdo', { + filter: 'audioonly' + }); + const dispatcher = connection.playStream(stream, { volume: 0.5 }); @@ -18,4 +22,4 @@ module.exports = { msg.reply('you need to join a voice channel first silly'); } } -}
\ No newline at end of file +};
\ No newline at end of file diff --git a/commands/botstatus.js b/commands/botstatus.js new file mode 100644 index 0000000..6401571 --- /dev/null +++ b/commands/botstatus.js @@ -0,0 +1,15 @@ +// TODO: bot status + +module.exports = { + name: 'botstatus', + aliases: ['status', 'bs'], + description: '', + async execute(msg, args, bot) { + if (msg.member.hasPermission('KICK_MEMBERS')) { + m = args.join(' '); + bot.user.setActivity(m); + } else { + msg.reply('insufficent perms bruh'); + } + } +};
\ No newline at end of file diff --git a/commands/clear.js b/commands/clear.js index 90eef2e..fe8e46f 100644 --- a/commands/clear.js +++ b/commands/clear.js @@ -43,4 +43,4 @@ module.exports = { msg.reply('insufficent perms bruh'); } } -}
\ No newline at end of file +};
\ No newline at end of file diff --git a/commands/commands.js b/commands/commands.js index e78ae45..47af2e6 100644 --- a/commands/commands.js +++ b/commands/commands.js @@ -29,4 +29,4 @@ module.exports = { msg.channel.send(RichEmbed = emb); } -}
\ No newline at end of file +};
\ No newline at end of file diff --git a/commands/dm.js b/commands/dm.js index edd8a0a..fcaeb0d 100644 --- a/commands/dm.js +++ b/commands/dm.js @@ -4,11 +4,11 @@ module.exports = { execute(msg, args, bot) { if (msg.author) { // TODO: fix discord not evaluating args[1] if (!msg.mentions.users.first() && !args[1]) { - msg.reply('you haven\'t specified a user or a message.') + msg.reply('you haven\'t specified a user or a message.'); } else if (!args[1]) { - msg.reply('you haven\'t specified anything to send.') + msg.reply('you haven\'t specified anything to send.'); } else if (!msg.mentions.users.first()) { - msg.reply('you haven\'t specified anyone to send a dm to.') + msg.reply('you haven\'t specified anyone to send a dm to.'); } else { var sendTo = msg.mentions.users.first().id; var d = new Date(msg.createdTimestamp); @@ -63,4 +63,4 @@ module.exports = { msg.reply('insufficent perms bruh'); } } -}
\ No newline at end of file +};
\ No newline at end of file diff --git a/commands/emoji.js b/commands/emoji.js index 28ab679..5724895 100644 --- a/commands/emoji.js +++ b/commands/emoji.js @@ -7,4 +7,4 @@ module.exports = { execute(msg, args, bot) { msg.reply(emoji.random()); } -}
\ No newline at end of file +};
\ No newline at end of file diff --git a/commands/fart.js b/commands/fart.js index 3da3f3b..de62889 100644 --- a/commands/fart.js +++ b/commands/fart.js @@ -13,7 +13,7 @@ module.exports = { }); dispatcher.on('end', () => { msg.member.voiceChannel.leave(); - }) + }); } else if (fartNum == 2) { msg.reply('you got fart 2, courtesy of Sin'); const dispatcher = connection.playFile('./assets/audio/farts/2.mp3', { @@ -21,7 +21,7 @@ module.exports = { }); dispatcher.on('end', () => { msg.member.voiceChannel.leave(); - }) + }); } else if (fartNum == 3) { msg.reply('you got fart 3, courtesy of Sin'); const dispatcher = connection.playFile('./assets/audio/farts/3.mp3', { @@ -29,7 +29,7 @@ module.exports = { }); dispatcher.on('end', () => { msg.member.voiceChannel.leave(); - }) + }); } else if (fartNum == 4) { msg.reply('you got fart 4, courtesy of Sin'); const dispatcher = connection.playFile('./assets/audio/farts/4.mp3', { @@ -37,7 +37,7 @@ module.exports = { }); dispatcher.on('end', () => { msg.member.voiceChannel.leave(); - }) + }); } else if (fartNum == 5) { msg.reply('you got fart 5, courtesy of Sin'); const dispatcher = connection.playFile('./assets/audio/farts/5.mp3', { @@ -45,7 +45,7 @@ module.exports = { }); dispatcher.on('end', () => { msg.member.voiceChannel.leave(); - }) + }); } else if (fartNum == 6) { msg.reply('you got fart 6, courtesy of nick'); const dispatcher = connection.playFile('./assets/audio/farts/6.mp3', { @@ -53,7 +53,7 @@ module.exports = { }); dispatcher.on('end', () => { msg.member.voiceChannel.leave(); - }) + }); } else if (fartNum == 7) { msg.reply('you got fart 7, courtesy of nick'); const dispatcher = connection.playFile('./assets/audio/farts/7.mp3', { @@ -61,7 +61,7 @@ module.exports = { }); dispatcher.on('end', () => { msg.member.voiceChannel.leave(); - }) + }); } else if (fartNum == 8) { msg.reply('you got fart 8, courtesy of nick'); const dispatcher = connection.playFile('./assets/audio/farts/8.mp3', { @@ -69,7 +69,7 @@ module.exports = { }); dispatcher.on('end', () => { msg.member.voiceChannel.leave(); - }) + }); } } else if (msg.guild.voiceConnection) { msg.reply('i\'m already playing that lol'); @@ -77,4 +77,4 @@ module.exports = { msg.reply('you need to join a voice channel first silly'); } } -}
\ No newline at end of file +};
\ No newline at end of file diff --git a/commands/help.js b/commands/help.js index 4c7ecf0..b963301 100644 --- a/commands/help.js +++ b/commands/help.js @@ -34,4 +34,4 @@ ice-king: says a quote from ice king from adventure time.`, false) msg.channel.send(RichEmbed = emb); } } -}
\ No newline at end of file +};
\ No newline at end of file diff --git a/commands/join.js b/commands/join.js index 15ef1de..b07e6c7 100644 --- a/commands/join.js +++ b/commands/join.js @@ -12,4 +12,4 @@ module.exports = { msg.reply('you\'re not in a voice channel'); } } -}
\ No newline at end of file +};
\ No newline at end of file diff --git a/commands/leave.js b/commands/leave.js index 51fac82..6965069 100644 --- a/commands/leave.js +++ b/commands/leave.js @@ -9,4 +9,4 @@ module.exports = { msg.reply('i\'m not in a voice channel'); } } -}
\ No newline at end of file +};
\ No newline at end of file diff --git a/commands/membercount.js b/commands/membercount.js index 7c32f16..8edc030 100644 --- a/commands/membercount.js +++ b/commands/membercount.js @@ -5,4 +5,4 @@ module.exports = { execute(msg, args, bot) { msg.reply(`there are **${msg.guild.memberCount}** members in **${msg.guild.name}**`); } -}
\ No newline at end of file +};
\ No newline at end of file diff --git a/commands/ping.js b/commands/ping.js index b881170..7837180 100644 --- a/commands/ping.js +++ b/commands/ping.js @@ -18,4 +18,4 @@ module.exports = { msg.channel.send(RichEmbed = emb); }); } -}
\ No newline at end of file +};
\ No newline at end of file diff --git a/commands/psycho.js b/commands/psycho.js new file mode 100644 index 0000000..9ecc8a1 --- /dev/null +++ b/commands/psycho.js @@ -0,0 +1,25 @@ +const ytdl = require('ytdl-core'); + +module.exports = { + name: 'psycho', + description: '', + async execute(msg, args, bot) { + if (msg.member.voiceChannel && !msg.guild.voiceConnection) { + const connection = await msg.member.voiceChannel.join(); + const stream = ytdl('https://www.youtube.com/watch?v=fnd_HSmAODs', { + filter: 'audioonly' + }); + const dispatcher = connection.playStream(stream, { + volume: 0.5 + }); + + dispatcher.on('end', () => { + msg.member.voiceChannel.leave(); + }); + } else if (msg.guild.voiceConnection) { + msg.reply('i\'m already playing that lol'); + } else { + msg.reply('you need to join a voice channel first silly'); + } + } +};
\ No newline at end of file diff --git a/commands/quote.js b/commands/quote.js index 8b182e6..133c9eb 100644 --- a/commands/quote.js +++ b/commands/quote.js @@ -15,4 +15,4 @@ module.exports = { msg.reply(atquotes.getIceKingQuote()); } } -}
\ No newline at end of file +};
\ No newline at end of file diff --git a/commands/reboot.js b/commands/reboot.js index b9fc6aa..f5ec9eb 100644 --- a/commands/reboot.js +++ b/commands/reboot.js @@ -7,4 +7,4 @@ module.exports = { msg.member.voiceChannel.leave(); msg.reply('reboot finished lol'); } -}
\ No newline at end of file +};
\ No newline at end of file diff --git a/commands/say.js b/commands/say.js index 914a393..a27558f 100644 --- a/commands/say.js +++ b/commands/say.js @@ -8,4 +8,4 @@ module.exports = { msg.delete(); } } -}
\ No newline at end of file +};
\ No newline at end of file diff --git a/commands/server.js b/commands/server.js index 417aa4c..220857d 100644 --- a/commands/server.js +++ b/commands/server.js @@ -23,4 +23,4 @@ module.exports = { msg.channel.send(RichEmbed = emb); } -}
\ No newline at end of file +};
\ No newline at end of file diff --git a/commands/squeak.js b/commands/squeak.js index 02ef20a..a1c4046 100644 --- a/commands/squeak.js +++ b/commands/squeak.js @@ -10,11 +10,11 @@ module.exports = { dispatcher.on('end', () => { msg.member.voiceChannel.leave(); - }) + }); } else if (msg.guild.voiceConnection) { msg.reply('i\'m already playing that lol'); } else { msg.reply('you need to join a voice channel first silly'); } } -}
\ No newline at end of file +};
\ No newline at end of file diff --git a/commands/uhhhh.js b/commands/uhhhh.js index 18e6081..3c84d8d 100644 --- a/commands/uhhhh.js +++ b/commands/uhhhh.js @@ -10,11 +10,11 @@ module.exports = { dispatcher.on('end', () => { msg.member.voiceChannel.leave(); - }) + }); } else if (msg.guild.voiceConnection) { msg.reply('i\'m already playing that lol'); } else { msg.reply('you need to join a voice channel first silly'); } } -}
\ No newline at end of file +};
\ No newline at end of file diff --git a/commands/wahoo.js b/commands/wahoo.js index 540a801..4745874 100644 --- a/commands/wahoo.js +++ b/commands/wahoo.js @@ -10,11 +10,11 @@ module.exports = { dispatcher.on('end', () => { msg.member.voiceChannel.leave(); - }) + }); } else if (msg.guild.voiceConnection) { msg.reply('i\'m already playing that lol'); } else { msg.reply('you need to join a voice channel first silly'); } } -}
\ No newline at end of file +};
\ No newline at end of file |