summaryrefslogtreecommitdiff
path: root/src/commands/fun
diff options
context:
space:
mode:
author8cy <[email protected]>2020-04-27 10:40:43 -0700
committer8cy <[email protected]>2020-04-27 10:40:43 -0700
commit5aee01b480ee2a3fb0581dec20e890ac2f1743d7 (patch)
tree0b49b4e1dd2f2001ccf3d17b09bec3bc2d6a79cc /src/commands/fun
parentchange formatting of serverinfo embed, v8.0.1 (diff)
downloaddep-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/commands/fun')
-rw-r--r--src/commands/fun/8ball.ts2
-rw-r--r--src/commands/fun/coinflip.ts2
-rw-r--r--src/commands/fun/embed.ts35
-rw-r--r--src/commands/fun/respect.ts2
-rw-r--r--src/commands/fun/say.ts8
5 files changed, 40 insertions, 9 deletions
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