19 lines
399 B
Go
19 lines
399 B
Go
package main
|
|
|
|
import (
|
|
neco "git.nefrace.ru/nefrace/nechotron"
|
|
)
|
|
|
|
var MainState = neco.State{
|
|
Fn: func(u *neco.Update) error {
|
|
privateDisp := neco.NewDispatcher().
|
|
HandleCommand(commandMe, handleMe).
|
|
HandleCommand(commandHelp, handleHelp).
|
|
HandleCommand(commandSay, handleSay)
|
|
disp := neco.NewDispatcher().
|
|
HandleFilter(neco.IsPrivate, privateDisp.Run)
|
|
|
|
return disp.Run(u)
|
|
},
|
|
}
|