mirror of
https://github.com/qwerinope/qweribot.git
synced 2025-12-18 21:11:39 +01:00
fix one character commands lmao
This commit is contained in:
@@ -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; };
|
||||
|
||||
@@ -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 };
|
||||
|
||||
Reference in New Issue
Block a user