Releases: valgaze/speedybot
Releases · valgaze/speedybot
v1.0.19
v1.0.13
v1.0.12
- Merge pull request #15 from valgaze/chipfix 4c876fa
- add feature to make chips disappear on tap c6176ef
Disappear
$bot.setChipsConfig({disappearOnTap: true})
Persist (default)
$bot.setChipsConfig({disappearOnTap: false})
ex.
{
keyword: 'chips',
async handler(bot) {
const $bot = $(bot)
// Set chips to disappear after tap
$bot.setChipsConfig({disappearOnTap: true})
// Send chip with custom handler
const customChip = {
label: 'custom chip',
handler(bot:BotInst, trigger: Trigger) {
$bot.sendSnippet(trigger, `**The 'custom chip' was tapped** `)
$bot.$trigger('chips', trigger) // re-render chips
}
}
// Add optional title
$bot.sendChips(['hey', 'ping', '$', 'pong', customChip], 'These chips will disappear on tap')
},
helpText: 'Returns a sample list of "chips"'
}