Skip to content

Commit

Permalink
Merge branch 'main' into 'main'
Browse files Browse the repository at this point in the history
Add check for user in quote post command

See merge request zyner/xyter/bot!1
  • Loading branch information
VermiumSifell committed Sep 26, 2023
2 parents f1f5513 + 2395167 commit 87501c8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/commands/quotes/subcommands/post/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 87501c8

Please sign in to comment.