Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

commands(give): let users with ManageGuild permission self-run /give #1080

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
commands(give): add missing semicolons
  • Loading branch information
cotton105 committed Jan 10, 2025
commit d1f0d525e6b056c116fec85cb10822cf51624edb
6 changes: 3 additions & 3 deletions src/commands/give.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ class GiveCommand extends Command {
const xp = interaction.options.getInteger("xp");

// check whether user is giving it to themselves
const isGuildOwner = () => interaction.user.id === interaction.guild.ownerId
const isGuildManager = () => interaction.memberPermissions.has(PermissionFlagsBits.ManageGuild)
const isGivingToSelf = () => interaction.user.id === user.id
const isGuildOwner = () => interaction.user.id === interaction.guild.ownerId;
const isGuildManager = () => interaction.memberPermissions.has(PermissionFlagsBits.ManageGuild);
const isGivingToSelf = () => interaction.user.id === user.id;
if (!isGuildOwner() && !isGuildManager() && isGivingToSelf()) {
return await interaction.reply((interaction.client as Client).locales.getText(interaction.guildLocale, "giveSelfError"));
}
Expand Down
Loading