fix one character commands lmao

This commit is contained in:
2025-09-19 22:17:58 +02:00
parent 35409f335a
commit 771e1b9c49
2 changed files with 2 additions and 0 deletions

View File

@@ -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; };

View File

@@ -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 };