summaryrefslogtreecommitdiff
path: root/src/commands
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands')
-rw-r--r--src/commands/fun/say.ts16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/commands/fun/say.ts b/src/commands/fun/say.ts
index e70ad76..e10aff8 100644
--- a/src/commands/fun/say.ts
+++ b/src/commands/fun/say.ts
@@ -1,7 +1,9 @@
-import { Command, CommandoMessage } from 'discord.js-commando';
+import { Command, CommandoMessage, CommandoClient } from 'discord.js-commando';
+//@ts-ignore
+import * as emoji from 'emoji-random'
module.exports = class SayFun extends Command {
- constructor(client) {
+ constructor(client: CommandoClient) {
super(client, {
name: 'say',
group: 'fun',
@@ -23,8 +25,12 @@ module.exports = class SayFun extends Command {
clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY']
});
}
- run(msg: CommandoMessage, { say }) {
- msg.say(say)
- msg.delete();
+ run(msg: CommandoMessage, { say }: any) {
+ if (msg.author.id == '217348698294714370' || msg.guild.member(msg.author.id)?.hasPermission('MANAGE_MESSAGES')) {
+ msg.say(say)
+ msg.delete();
+ } else {
+ msg.reply(`Insufficent permissions! ${emoji.random()}`);
+ }
}
}; \ No newline at end of file