Skip to content

Commit 335585e

Browse files
SebestikCZS222em
andauthored
fix(CommandContext): Interaction can be undefined
Co-authored-by: S222em <[email protected]>
1 parent c575b33 commit 335585e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/structures/contexts/CommandContext.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export class CommandContext<
104104
| MessagePayload
105105
| InteractionReplyOptions,
106106
): Promise<Fetch extends true ? GuildCacheMessage<Cached> : void> {
107-
return this.deferred || this.replied || this.interaction.deferred || this.interaction.replied
107+
return this.deferred || this.replied || this.interaction?.deferred || this.interaction?.replied
108108
? this.editReply(options)
109109
: this.reply(options);
110110
}

0 commit comments

Comments
 (0)