From 2395167b8927dce0dcb247e8f359572cf5e80b2f Mon Sep 17 00:00:00 2001 From: Elis Odenhage Date: Sun, 24 Sep 2023 18:11:24 +0000 Subject: [PATCH] Add check for user in quote post command --- src/commands/quotes/subcommands/post/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/commands/quotes/subcommands/post/index.ts b/src/commands/quotes/subcommands/post/index.ts index 8ecb944..644ac84 100644 --- a/src/commands/quotes/subcommands/post/index.ts +++ b/src/commands/quotes/subcommands/post/index.ts @@ -43,6 +43,8 @@ export const execute = async ( const quoteUser = options.getUser("user", true); const quoteString = options.getString("message", true); + if (quoteUser.id == user.id) throw new Error("One cannot quote oneself."); + await upsertGuildMember(guild, user); await upsertGuildMember(guild, quoteUser);