forked from syntaxbullet/AuroraBot-discord
feat: Prevent inventory, profile, balance, and pay commands from targeting bot users.
This commit is contained in:
@@ -23,6 +23,13 @@ export const pay = createCommand({
|
||||
),
|
||||
execute: async (interaction) => {
|
||||
const targetUser = await userService.getOrCreateUser(interaction.options.getUser("user", true).id, interaction.options.getUser("user", true).username);
|
||||
const discordUser = interaction.options.getUser("user", true);
|
||||
|
||||
if (discordUser.bot) {
|
||||
await interaction.reply({ embeds: [createWarningEmbed("You cannot send money to bots.")], flags: MessageFlags.Ephemeral });
|
||||
return;
|
||||
}
|
||||
|
||||
const amount = BigInt(interaction.options.getInteger("amount", true));
|
||||
const senderId = interaction.user.id;
|
||||
const receiverId = targetUser.id;
|
||||
|
||||
Reference in New Issue
Block a user