summaryrefslogtreecommitdiff
path: root/server/src
diff options
context:
space:
mode:
author8cy <[email protected]>2020-07-27 04:54:38 -0700
committer8cy <[email protected]>2020-07-27 04:54:38 -0700
commit0e7b124f5e4994081dff826c4719a20d986cbfe1 (patch)
tree3d08553d23374980a95438f5f7d096a478183c4d /server/src
parentbig revamp n stuff (diff)
downloaddep-core-0e7b124f5e4994081dff826c4719a20d986cbfe1.tar.xz
dep-core-0e7b124f5e4994081dff826c4719a20d986cbfe1.zip
fix: pfp block me/ feat: say types now
Diffstat (limited to 'server/src')
-rw-r--r--server/src/client/BotClient.ts5
-rw-r--r--server/src/commands/fun/Say.ts8
-rw-r--r--server/src/commands/server/PFP.ts6
3 files changed, 11 insertions, 8 deletions
diff --git a/server/src/client/BotClient.ts b/server/src/client/BotClient.ts
index 086dc4e..37c9396 100644
--- a/server/src/client/BotClient.ts
+++ b/server/src/client/BotClient.ts
@@ -13,7 +13,8 @@ declare module 'discord-akairo' {
listenerHandler: ListenerHandler;
logger: Logger;
settings: SettingsProvider;
- img
+ img,
+ wait
}
}
@@ -35,6 +36,8 @@ export default class BotClient extends AkairoClient {
});
});
}
+
+ public wait = require("util").promisify(setTimeout);
public inhibitorHandler: InhibitorHandler = new InhibitorHandler(this, {
directory: join(__dirname, '..', 'inhibitors')
diff --git a/server/src/commands/fun/Say.ts b/server/src/commands/fun/Say.ts
index 876f539..1fcd4da 100644
--- a/server/src/commands/fun/Say.ts
+++ b/server/src/commands/fun/Say.ts
@@ -28,11 +28,13 @@ export default class SayFun extends Command {
});
}
- public exec(msg: Message, { text }): Promise<Message> {
- console.log(text)
+ public async exec(msg: Message, { text }): Promise<Message | void> {
if (validIDs.includes(msg.author.id) || owners.includes(msg.author.id)) {
msg.delete();
- return msg.channel.send(text);
+ msg.channel.startTyping();
+ await this.client.wait(1500);
+ msg.channel.send(text);
+ return msg.channel.stopTyping();
}
return msg.delete();
diff --git a/server/src/commands/server/PFP.ts b/server/src/commands/server/PFP.ts
index 4f15123..95b6f17 100644
--- a/server/src/commands/server/PFP.ts
+++ b/server/src/commands/server/PFP.ts
@@ -23,7 +23,7 @@ export default class PFPServer extends Command {
start: 'Which user\'s avatar would you like to grab?',
retries: 3,
retry: 'Please choose a valid user.',
- optional: true
+ optional: false
}
}
]
@@ -31,9 +31,6 @@ export default class PFPServer extends Command {
}
public exec(msg: Message, { user }): Promise<Message> {
- if ((user.id === owners[1]) && (msg.author.id !== owners[1]))
- msg.reply('Sin is special, their identity shall remain anonymous.');
-
let embed = this.client.util.embed()
.setColor(colour)
@@ -50,6 +47,7 @@ export default class PFPServer extends Command {
}
return msg.channel.send(embed);
} else {
+ if (user.id === owners[0]) return msg.reply('Sin is special, their identity shall remain anonymous.');
let format = user.displayAvatarURL({ dynamic: true }).substr(user.displayAvatarURL({ dynamic: true}).length - 3);
if (format == 'gif') {
embed.setAuthor(user.username);