summaryrefslogtreecommitdiff
path: root/src/commands
diff options
context:
space:
mode:
author8cy <[email protected]>2020-07-07 04:06:17 -0700
committer8cy <[email protected]>2020-07-07 04:06:17 -0700
commitb8e94ff00df6df27ea2dc09f66067e91adeb0483 (patch)
tree3eca0304c0c07797fe10b7487f2b38c8cd709b72 /src/commands
parentbig cool :star: (diff)
downloaddep-core-b8e94ff00df6df27ea2dc09f66067e91adeb0483.tar.xz
dep-core-b8e94ff00df6df27ea2dc09f66067e91adeb0483.zip
say has private perms now
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