mirror of
https://github.com/qwerinope/qweribot.git
synced 2025-12-19 05:51:37 +01:00
when using useitem special alias, no more help text appears
This commit is contained in:
@@ -13,10 +13,11 @@ export default new Command({
|
|||||||
specialaliases: ['i'],
|
specialaliases: ['i'],
|
||||||
execution: async (msg, user) => {
|
execution: async (msg, user) => {
|
||||||
const messagequery = msg.messageText.trim().split(' ').slice(1);
|
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());
|
const selection = items.get(messagequery[0].toLowerCase());
|
||||||
if (messagequery[0].toLowerCase() === "lootbox") { await getloot.execute(msg, user); return; };
|
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 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); };
|
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);
|
await selection.execute(msg, user);
|
||||||
|
|||||||
Reference in New Issue
Block a user