16 lines
329 B
JavaScript
16 lines
329 B
JavaScript
module.exports = bot => {
|
|
const { startTask } = bot.handlers
|
|
|
|
bot.command('start', startTask.start)
|
|
|
|
const routeList = ctx => {
|
|
switch (String(ctx.state.value)) {
|
|
case 'test':
|
|
return startTask.subscribe(ctx)
|
|
}
|
|
}
|
|
|
|
bot.route.on('startMenu', routeList)
|
|
bot.route.otherwise(({ deleteMessage }) => deleteMessage())
|
|
}
|