feat: Prevent inventory, profile, balance, and pay commands from targeting bot users.

This commit is contained in:
syntaxbullet
2025-12-15 22:21:29 +01:00
parent 7e986fae5a
commit 9333d6ac6c
4 changed files with 26 additions and 0 deletions

View File

@@ -17,6 +17,12 @@ export const inventory = createCommand({
await interaction.deferReply();
const targetUser = interaction.options.getUser("user") || interaction.user;
if (targetUser.bot) {
await interaction.editReply({ embeds: [createWarningEmbed("Bots do not have inventories.", "Inventory Check")] });
return;
}
const user = await userService.getOrCreateUser(targetUser.id, targetUser.username);
const items = await inventoryService.getInventory(user.id);