diff options
| author | 8cy <[email protected]> | 2020-04-27 10:40:43 -0700 |
|---|---|---|
| committer | 8cy <[email protected]> | 2020-04-27 10:40:43 -0700 |
| commit | 5aee01b480ee2a3fb0581dec20e890ac2f1743d7 (patch) | |
| tree | 0b49b4e1dd2f2001ccf3d17b09bec3bc2d6a79cc /src | |
| parent | change formatting of serverinfo embed, v8.0.1 (diff) | |
| download | dep-core-5aee01b480ee2a3fb0581dec20e890ac2f1743d7.tar.xz dep-core-5aee01b480ee2a3fb0581dec20e890ac2f1743d7.zip | |
add support and embed cmd, v8.0.2
also change msg.channel.send to msg.say
Diffstat (limited to 'src')
| -rw-r--r-- | src/bot.ts | 2 | ||||
| -rw-r--r-- | src/commands/bot/clientid.ts | 4 | ||||
| -rw-r--r-- | src/commands/bot/servercount.ts | 4 | ||||
| -rw-r--r-- | src/commands/bot/support.ts | 23 | ||||
| -rw-r--r-- | src/commands/bot/uptime.ts | 4 | ||||
| -rw-r--r-- | src/commands/bot/version.ts | 4 | ||||
| -rw-r--r-- | src/commands/fun/8ball.ts | 2 | ||||
| -rw-r--r-- | src/commands/fun/coinflip.ts | 2 | ||||
| -rw-r--r-- | src/commands/fun/embed.ts | 35 | ||||
| -rw-r--r-- | src/commands/fun/respect.ts | 2 | ||||
| -rw-r--r-- | src/commands/fun/say.ts | 8 | ||||
| -rw-r--r-- | src/commands/server/server.ts | 2 | ||||
| -rw-r--r-- | src/commands/voice/loop.ts | 2 | ||||
| -rw-r--r-- | src/commands/voice/play.ts | 2 | ||||
| -rw-r--r-- | src/config.json | 2 |
15 files changed, 76 insertions, 22 deletions
@@ -39,7 +39,7 @@ client.registry client.once('ready', () => { //console.log(`Started bot: ${client.user.tag} (ID: ${client.user.id})\nCurrently running on ${client.guilds.cache.size} server(s).`); - console.log('Bot online!') + console.log('\x1b[0m' + 'Bot online!') console.log('\x1b[31m' + ` _ _ __ _ | | | | / _(_) | | | |_ ___ _| |_ _ ___ _ __ diff --git a/src/commands/bot/clientid.ts b/src/commands/bot/clientid.ts index ea89891..65040bf 100644 --- a/src/commands/bot/clientid.ts +++ b/src/commands/bot/clientid.ts @@ -20,14 +20,14 @@ module.exports = class ClientIDBot extends Command { }); } run(msg: CommandoMessage) { - msg.channel.send('Please wait...').then(m => { + msg.say('Please wait...').then(m => { m.edit(`** **`); let emb = new MessageEmbed() .setDescription('uwufier\'s client ID is **699473263998271489**. ' + emoji.random()) .setColor(0xFFCC4D) - msg.channel.send(emb); + msg.say(emb); }); } };
\ No newline at end of file diff --git a/src/commands/bot/servercount.ts b/src/commands/bot/servercount.ts index 49fcc5c..84fdaae 100644 --- a/src/commands/bot/servercount.ts +++ b/src/commands/bot/servercount.ts @@ -16,14 +16,14 @@ module.exports = class ServerCountServer extends Command { }); } run(msg: CommandoMessage) { - msg.channel.send('Please wait...').then(m => { + msg.say('Please wait...').then(m => { m.edit(`** **`); let emb = new MessageEmbed() .setDescription(`Currently running on ${this.client.guilds.cache.size} server(s). ` + emoji.random()) .setColor(0xFFCC4D) - msg.channel.send(emb); + msg.say(emb); }); } };
\ No newline at end of file diff --git a/src/commands/bot/support.ts b/src/commands/bot/support.ts new file mode 100644 index 0000000..c022de7 --- /dev/null +++ b/src/commands/bot/support.ts @@ -0,0 +1,23 @@ +import { Command, CommandoMessage } from 'discord.js-commando'; +import emoji from 'emoji-random'; + +module.exports = class SupportBot extends Command { + constructor(client) { + super(client, { + name: 'support', + group: 'bot', + memberName: 'support', + description: 'Gives you the bot\'s support server link.', + examples: ['uwu!support'], + userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], + clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], + throttling: { + usages: 5, + duration: 30 + }, + }); + } + run(msg: CommandoMessage) { + msg.reply('For support, please join; https://crack.cf/uwufier-support. ' + emoji.random()) + } +};
\ No newline at end of file diff --git a/src/commands/bot/uptime.ts b/src/commands/bot/uptime.ts index 3280d9e..9128ab7 100644 --- a/src/commands/bot/uptime.ts +++ b/src/commands/bot/uptime.ts @@ -26,14 +26,14 @@ export default class UptimeBot extends Command { } run(msg: CommandoMessage) { const duration = _duration(this.client.uptime).format(" D [days], H [hrs], m [mins], s [secs]"); - msg.channel.send('Please wait...').then(m => { + msg.say('Please wait...').then(m => { m.edit(`** **`); let emb = new MessageEmbed() .setDescription('<@699473263998271489> has been up for ' + duration + '. ' + emoji.random()) .setColor(0xFFCC4D) - msg.channel.send(emb); + msg.say(emb); }); } }
\ No newline at end of file diff --git a/src/commands/bot/version.ts b/src/commands/bot/version.ts index 7d2c71b..01119dc 100644 --- a/src/commands/bot/version.ts +++ b/src/commands/bot/version.ts @@ -22,14 +22,14 @@ export default class VersionBot extends Command { }); } run(msg: CommandoMessage) { - msg.channel.send('Please wait...').then(m => { + msg.say('Please wait...').then(m => { m.edit(`** **`); let emb = new MessageEmbed() .setDescription(`uwufier\'s current build version is **v${config['version']}**. ` + emoji.random()) .setColor(0xFFCC4D) - msg.channel.send(emb); + msg.say(emb); }); } }
\ No newline at end of file diff --git a/src/commands/fun/8ball.ts b/src/commands/fun/8ball.ts index 5fc6ad7..989e036 100644 --- a/src/commands/fun/8ball.ts +++ b/src/commands/fun/8ball.ts @@ -71,6 +71,6 @@ module.exports = class EightBallFun extends Command { .setAuthor('The 8-ball says', 'https://upload.wikimedia.org/wikipedia/commons/thumb/f/fd/8-Ball_Pool.svg/500px-8-Ball_Pool.svg.png') .setDescription('`' + s + '`'); - msg.channel.send(embed); + msg.say(embed); } };
\ No newline at end of file diff --git a/src/commands/fun/coinflip.ts b/src/commands/fun/coinflip.ts index c37ab8c..f491d93 100644 --- a/src/commands/fun/coinflip.ts +++ b/src/commands/fun/coinflip.ts @@ -26,6 +26,6 @@ module.exports = class CoinFlipFun extends Command { .setAuthor('The coin landed on', 'https://i.imgur.com/pr7JCce.png') .setDescription('`' + s + '`'); - msg.channel.send(embed); + msg.say(embed); } };
\ No newline at end of file diff --git a/src/commands/fun/embed.ts b/src/commands/fun/embed.ts new file mode 100644 index 0000000..fb59845 --- /dev/null +++ b/src/commands/fun/embed.ts @@ -0,0 +1,35 @@ +import { Command, CommandoMessage } from 'discord.js-commando'; +import emoji from 'emoji-random'; +import { MessageEmbed } from 'discord.js'; + +module.exports = class EmbedFun extends Command { + constructor(client) { + super(client, { + name: 'embed', + group: 'fun', + memberName: 'embed', + description: 'Allows you to speak as the bot, except with embeds.', + args: [ + { + key: 'say', + prompt: 'What would you like to embed?', + type: 'string' + } + ], + examples: ['uwu!embed hi'], + throttling: { + usages: 5, + duration: 30 + }, + userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], + clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'] + }); + } + run(msg: CommandoMessage, { say }) { + let emb = new MessageEmbed() + .setColor(0xFFCC4D) + .setDescription(say) + msg.say(emb) + msg.delete(); + } +};
\ No newline at end of file diff --git a/src/commands/fun/respect.ts b/src/commands/fun/respect.ts index b41a319..362773a 100644 --- a/src/commands/fun/respect.ts +++ b/src/commands/fun/respect.ts @@ -18,7 +18,7 @@ module.exports = class RespectFun extends Command { }); } run(msg: CommandoMessage) { - msg.channel.send('Press F to pay respects.').then(m => { + msg.say('Press F to pay respects.').then(m => { m.react('🇫'); msg.delete(); }); diff --git a/src/commands/fun/say.ts b/src/commands/fun/say.ts index fa97b3a..35083d0 100644 --- a/src/commands/fun/say.ts +++ b/src/commands/fun/say.ts @@ -25,11 +25,7 @@ module.exports = class SayFun extends Command { }); } run(msg: CommandoMessage, { say }) { - if (msg.member.hasPermission('KICK_MEMBERS')) { - msg.channel.send(say); - msg.delete(); - } else { - msg.reply('Insufficent permsissions. ' + emoji.random()); - } + msg.say(say) + msg.delete(); } };
\ No newline at end of file diff --git a/src/commands/server/server.ts b/src/commands/server/server.ts index 152d78a..f488bc9 100644 --- a/src/commands/server/server.ts +++ b/src/commands/server/server.ts @@ -49,6 +49,6 @@ module.exports = class ServerServer extends Command { .addField(`${this.client.user.username} joined`, `${msg.guild.members.cache.get('699473263998271489').joinedAt}`) .setColor(0xFFCC4D); - msg.channel.send(embed); + msg.say(embed); } };
\ No newline at end of file diff --git a/src/commands/voice/loop.ts b/src/commands/voice/loop.ts index 69cc6a1..eb289a4 100644 --- a/src/commands/voice/loop.ts +++ b/src/commands/voice/loop.ts @@ -29,7 +29,7 @@ module.exports = class LoopVoice extends Command { ) { return msg.reply('There isn\'t any audio playing right now. ' + emoji.random()); } - msg.channel.send( + msg.say( `${msg.guild.musicData.nowPlaying.title} added to queue. ` + emoji.random() ); msg.guild.musicData.queue.unshift(msg.guild.musicData.nowPlaying); diff --git a/src/commands/voice/play.ts b/src/commands/voice/play.ts index 17bca2f..c6d37a9 100644 --- a/src/commands/voice/play.ts +++ b/src/commands/voice/play.ts @@ -144,7 +144,7 @@ module.exports = class PlayVoice extends Command { .addField(`‎`, '**Song #**' + vidNameArr[3]) .addField(`‎`, '**Song #**' + vidNameArr[4]) .addField(`‎`, '**Exit selection**: ' + 'exit'); - var songEmbed = await msg.channel.send({ + var songEmbed = await msg.say({ embed }); var that = this; diff --git a/src/config.json b/src/config.json index ebe3faf..7ec7634 100644 --- a/src/config.json +++ b/src/config.json @@ -1,5 +1,5 @@ { "secret":"Njk5NDczMjYzOTk4MjcxNDg5.XpU5oQ.btZuxVudhNllSQY6CxrXXtMJm9A", "yt-api-key":"AIzaSyCeG1lQAeInv4vjFv_eTL9IFAFNdQC9Nk8", - "version":"8.0.1" + "version":"8.0.2" }
\ No newline at end of file |