File tree 2 files changed +8
-0
lines changed
src/lib/structures/contexts
2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -64,4 +64,8 @@ export class CommandContext<Cached extends CacheType = CacheType> extends Contex
64
64
} ;
65
65
this . type = 'COMMAND' ;
66
66
}
67
+
68
+ public safeReply < Fetch extends boolean = boolean > ( options ?: InteractionReplyOptions & { fetchReply ?: Fetch } | string | MessagePayload | InteractionReplyOptions ) : Promise < Fetch extends true ? GuildCacheMessage < Cached > : void > {
69
+ return this . deferred || this . replied ? this . editReply ( options ) : this . reply ( options ) ;
70
+ }
67
71
}
Original file line number Diff line number Diff line change @@ -74,4 +74,8 @@ export class ComponentContext<Cached extends CacheType = CacheType> extends Cont
74
74
} ;
75
75
this . type = options . type ;
76
76
}
77
+
78
+ public safeReply < Fetch extends boolean = boolean > ( options ?: InteractionReplyOptions & { fetchReply ?: Fetch } | string | MessagePayload | InteractionReplyOptions ) : Promise < Fetch extends true ? GuildCacheMessage < Cached > : void > {
79
+ return this . deferred || this . replied ? this . editReply ( options ) : this . reply ( options ) ;
80
+ }
77
81
}
You can’t perform that action at this time.
0 commit comments