Skip to content

Commit cbcc92f

Browse files
committed
remove extraneous/incorrect checks
1 parent 6e0d43a commit cbcc92f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/modules/etc.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ export class EtcModule extends Module {
2929

3030
@command({ description: 'See if the bot is alive' })
3131
async ping(msg: Message) {
32-
if (msg.channel instanceof TextChannel)
33-
await msg.channel.send('pong. :ping_pong:');
32+
await msg.channel.send('pong. :ping_pong:');
3433
}
3534

3635
@listener({ event: 'messageCreate' })
@@ -50,7 +49,8 @@ export class EtcModule extends Module {
5049
async onReact(reaction: MessageReaction, member: GuildMember) {
5150
if (reaction.partial) return;
5251

53-
if (reaction.message.author?.id !== this.client.user?.id) return;
52+
if ((await reaction.message.fetch()).author.id !== this.client.user?.id)
53+
return;
5454
if (reaction.emoji.name !== DELETE_EMOJI) return;
5555
if (member.id === this.client.user?.id) return;
5656

@@ -66,7 +66,6 @@ export class EtcModule extends Module {
6666
inhibitors: [CommonInhibitors.botAdminsOnly],
6767
})
6868
async kill(msg: Message) {
69-
if (!(msg.channel instanceof TextChannel)) return;
7069
const confirm = '✅';
7170
const confirmationMessage = await msg.channel.send('Confirm?');
7271
confirmationMessage.react(confirm);

0 commit comments

Comments
 (0)