From 0930ec1c280244f3b8433aee4f513b2598f6976c Mon Sep 17 00:00:00 2001 From: qwerinope Date: Sat, 20 Sep 2025 00:32:55 +0200 Subject: [PATCH] when using useitem special alias, no more help text appears --- src/commands/useitem.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/commands/useitem.ts b/src/commands/useitem.ts index 6021a3f..9e6042d 100644 --- a/src/commands/useitem.ts +++ b/src/commands/useitem.ts @@ -13,10 +13,11 @@ export default new Command({ specialaliases: ['i'], execution: async (msg, user) => { const messagequery = msg.messageText.trim().split(' ').slice(1); - if (!messagequery[0]) { await sendMessage('Please specify an item you would like to use', msg.messageId); return; }; + const silent = msg.messageText.toLowerCase().startsWith('i'); + if (!messagequery[0]) { if (!silent) { await sendMessage('Please specify an item you would like to use', msg.messageId); }; return; }; const selection = items.get(messagequery[0].toLowerCase()); if (messagequery[0].toLowerCase() === "lootbox") { await getloot.execute(msg, user); return; }; - if (!selection) { await sendMessage(`'${messagequery[0]}' is not an item`, msg.messageId); return; }; + if (!selection) { if (!silent) { await sendMessage(`'${messagequery[0]}' is not an item`, msg.messageId); }; return; }; if (await redis.sismember('disabledcommands', selection.name)) { await sendMessage(`The ${selection.prettyName} item is disabled`, msg.messageId); return; }; if (await isInvuln(msg.chatterId) && !streamerUsers.includes(msg.chatterId)) { await sendMessage(`You're no longer an invuln because you used an item.`, msg.messageId); await removeInvuln(msg.chatterId); }; await selection.execute(msg, user);