diff --git a/src/slash/challenge.ts b/src/slash/challenge.ts index e051a2c..0077a0b 100644 --- a/src/slash/challenge.ts +++ b/src/slash/challenge.ts @@ -25,6 +25,11 @@ export class ChallengeCommand implements SlashCommand { async execute(int: CommandInteraction) { const args = createArgumentsObject(int.options.data); const client = int.client as CBClient; + + if (int.user.id === args.opponent.id) return int.reply({ + content: "You can't challenge yourself!", + ephemeral: true + }); const player1 = await CBClient.findOrCreatePlayer(int.user.id); const player2 = await CBClient.findOrCreatePlayer(args.opponent.id);