File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -29,8 +29,7 @@ export class EtcModule extends Module {
29
29
30
30
@command ( { description : 'See if the bot is alive' } )
31
31
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:' ) ;
34
33
}
35
34
36
35
@listener ( { event : 'messageCreate' } )
@@ -50,7 +49,8 @@ export class EtcModule extends Module {
50
49
async onReact ( reaction : MessageReaction , member : GuildMember ) {
51
50
if ( reaction . partial ) return ;
52
51
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 ;
54
54
if ( reaction . emoji . name !== DELETE_EMOJI ) return ;
55
55
if ( member . id === this . client . user ?. id ) return ;
56
56
@@ -66,7 +66,6 @@ export class EtcModule extends Module {
66
66
inhibitors : [ CommonInhibitors . botAdminsOnly ] ,
67
67
} )
68
68
async kill ( msg : Message ) {
69
- if ( ! ( msg . channel instanceof TextChannel ) ) return ;
70
69
const confirm = '✅' ;
71
70
const confirmationMessage = await msg . channel . send ( 'Confirm?' ) ;
72
71
confirmationMessage . react ( confirm ) ;
You can’t perform that action at this time.
0 commit comments