mirror of
https://github.com/qwerinope/qweribot.git
synced 2025-12-19 09:01:38 +01:00
add inventory, give and admingive commands. Handle user records in database and minor bugfixes
This commit is contained in:
@@ -23,7 +23,7 @@ eventSub.onChannelChatMessage(streamerId, streamerId, async msg => {
|
||||
if (msg.messageText.startsWith(commandPrefix)) {
|
||||
const commandSelection = msg.messageText.slice(commandPrefix.length).split(' ')[0]!;
|
||||
const selected = commands.get(commandSelection.toLowerCase());
|
||||
if (!selected) { await sendMessage(`${commandSelection} command does not exist`, msg.messageId); return; };
|
||||
if (!selected) return;
|
||||
try { await selected.execute(msg, user!); }
|
||||
catch (err) { console.error(err); };
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user