summaryrefslogtreecommitdiff
path: root/src
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
parentbig cool :star: (diff)
downloaddep-core-b8e94ff00df6df27ea2dc09f66067e91adeb0483.tar.xz
dep-core-b8e94ff00df6df27ea2dc09f66067e91adeb0483.zip
say has private perms now
Diffstat (limited to 'src')
-rw-r--r--src/commands/fun/say.ts16
-rw-r--r--src/config.json2
2 files changed, 12 insertions, 6 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
diff --git a/src/config.json b/src/config.json
index 9d2111a..c07ba3c 100644
--- a/src/config.json
+++ b/src/config.json
@@ -2,7 +2,7 @@
"secret":"Njk5NDczMjYzOTk4MjcxNDg5.XpU5oQ.btZuxVudhNllSQY6CxrXXtMJm9A",
"secret-dev":"NzEyMDg4MzY5MjA2OTE5MjY5.XsMeEw.Yy0a8m2vZLDbPi7cZ8aqCalMR68",
"yt-api-key":"AIzaSyCeG1lQAeInv4vjFv_eTL9IFAFNdQC9Nk8",
- "version":"1.10.24",
+ "version":"1.10.25",
"fortniteTrackerNetworkToken": "4cf21f95-5f1a-412a-b4a7-e5424adc314a",
"mongodburi": "mongodb://sin:[email protected]:47107/heroku_4qrjvmb9"
} \ No newline at end of file