part 1 of full item/inventory rework

This commit is contained in:
2025-04-11 12:48:20 +02:00
parent 7b6f8bc07f
commit e3fc3465e9
12 changed files with 281 additions and 259 deletions

View File

@@ -1,31 +1,9 @@
import { createBotCommand } from "@twurple/easy-bot";
import items from "../items"
export default createBotCommand('iteminfo', async (params, { say }) => {
if (params[0] === undefined) { await say('No item specified!'); return }
let message = ''
switch (params[0].toLowerCase()) {
case 'blaster':
message = "Use: blaster {target}, Function: Times the target user out for 60 seconds. Aliases: !blast, !blaster"
break
case 'silver':
case 'silverbullet':
message = "Use: silverbullet {target}, Function: Times the target user out for 24 hours. Aliases: !execute, !silverbullet"
break
case 'grenade':
message = "Use: grenade, Function: Times a random chatter out for 60 seconds. Aliases: !grenade"
break
case 'tnt':
message = "Use: tnt, Function: Times out 1 to 10 chatters for 60 seconds. Aliases: !tnt"
break
case 'lootbox':
message = "Use: lootbox, Function: Gives the user some qbucks, and possibly some items. Aliases: !lootbox"
break
case 'clipboard':
message = "Use: clipboard {message}, Function: Starts a two minute long poll with the user specified message. Aliases: !clipboard"
break
default:
message = "Item not found"
break
}
await say(message)
const selection = items.find(item => item.aliases.includes(params[0].toLowerCase()))
if (!selection) { await say('Item not found'); return }
await say(selection[1].description)
}, { aliases: ['item'] })