fp/services/bot/src/collector.ts
CJ_Clippy f342bf9671
Some checks failed
ci / build (push) Failing after 1s
implement record retrying
2024-08-19 20:27:40 -08:00

14 lines
339 B
TypeScript

import { EventEmitter } from 'node:events'
import type { Interaction } from '@discordeno/bot'
export class ItemCollector extends EventEmitter {
onItem(callback: (item: Interaction) => unknown): void {
this.on('item', callback)
}
collect(item: Interaction): void {
this.emit('item', item)
}
}
export default ItemCollector