diff --git a/src/commands/basic/move.ts b/src/commands/basic/move.ts index 98beb7ac..aba62107 100644 --- a/src/commands/basic/move.ts +++ b/src/commands/basic/move.ts @@ -19,8 +19,8 @@ export class MoveCommand extends SwanCommand { interaction: SwanCommand.ContextMenuInteraction<'cached'>, _context: ContextMenuCommand.RunContext, ): Promise { - const message = interaction.options.getMessage('message', true); - await this._exec(interaction, message); + if (interaction.isMessageContextMenuCommand()) await this._exec(interaction, interaction.targetMessage); + else throw new Error('This command can only be run in a message context menu.'); } private async _exec(interaction: SwanCommand.CommandInteraction<'cached'>, targetedMessage: Message): Promise {