From 771e1b9c49417f551435e28d59b964b5cf45c855 Mon Sep 17 00:00:00 2001 From: qwerinope Date: Fri, 19 Sep 2025 22:17:58 +0200 Subject: [PATCH] fix one character commands lmao --- src/commands/useitem.ts | 1 + src/events/message.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/src/commands/useitem.ts b/src/commands/useitem.ts index c6674b7..6021a3f 100644 --- a/src/commands/useitem.ts +++ b/src/commands/useitem.ts @@ -10,6 +10,7 @@ export default new Command({ aliases: ['use'], usertype: 'chatter', disableable: false, + 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; }; diff --git a/src/events/message.ts b/src/events/message.ts index 2f960db..941cd34 100644 --- a/src/events/message.ts +++ b/src/events/message.ts @@ -87,6 +87,7 @@ function selectCommand(message: string): selectedCommand | false { const specialcmdselector = message.trim().toLowerCase().split(' ')[0]!; const specialcmd = specialAliasCommands.get(specialcmdselector); if (specialcmd) return { cmd: specialcmd, activation: specialcmdselector, isitem: specialcmd instanceof Item }; + if (!message.startsWith(commandPrefix)) return false; const commandSelector = message.slice(commandPrefix.length).trim().toLowerCase().split(' ')[0]!; const normalcmd = commands.get(commandSelector); if (normalcmd) return { cmd: normalcmd, activation: commandPrefix + commandSelector, isitem: normalcmd instanceof Item };