From 26f65706b639cac18fc0be85e44f65b8d9184a9d Mon Sep 17 00:00:00 2001 From: Victor Algaze Date: Tue, 16 Nov 2021 01:25:03 -0800 Subject: [PATCH] various tidy up --- src/helpers.ts | 12 +----------- src/speedybot.ts | 1 - 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/src/helpers.ts b/src/helpers.ts index 69c89e5..2dd9d2f 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -500,14 +500,6 @@ export class $Botutils { }) } - if (typeof chipPayload === 'string') { - let candidate: Chip = {label: ''} - candidate = { - label: chipPayload.split(' ').join('_') - } - newChips.push(candidate) - } - const chips = await this.getData(chipLabel) || [] const keys = newChips.map(({label}) => label) const writeChips = chips.filter(chip => !keys.includes(chip.label)).concat(newChips) @@ -520,9 +512,7 @@ export class $Botutils { const card = new SpeedyCard().setChips(labels) if (heading) { card.setSubtitle(heading) - this.sendTemplate([heading], { time: new Date().toString()}) } - this.botRef.sendCard(card.render(), heading ? heading : ' ') } @@ -555,4 +545,4 @@ export interface Chip { // args?: () => Promise } -export type ChipPayload = string | string[] | Chip[] | (string | Chip)[] \ No newline at end of file +export type ChipPayload = string[] | Chip[] | (string | Chip)[] \ No newline at end of file diff --git a/src/speedybot.ts b/src/speedybot.ts index 435d5bf..b038d84 100644 --- a/src/speedybot.ts +++ b/src/speedybot.ts @@ -239,7 +239,6 @@ import { const submit = { keyword: "<@submit>", handler(bot, trigger) { - bot.say('fRAZZLESLOLOLOLOLOLOLOL') const isChip = trigger.attachmentAction.inputs ? Boolean(trigger.attachmentAction.inputs.chip_action) : false;