1
0
mirror of https://github.com/fumiama/ReiBot.git synced 2026-06-06 01:20:24 +08:00
Files
ReiBot/example/main.go
2022-10-06 21:13:47 +08:00

26 lines
467 B
Go

package main
import (
_ "github.com/fumiama/ReiBot/example/echo"
rei "github.com/fumiama/ReiBot"
tgba "github.com/go-telegram-bot-api/telegram-bot-api/v5"
)
func main() {
rei.OnMessageFullMatch("help").SetBlock(true).
Handle(func(ctx *rei.Ctx) {
_, _ = ctx.SendPlainMessage(false, "echo string")
})
rei.Run(rei.Bot{
Token: "",
Buffer: 256,
UpdateConfig: tgba.UpdateConfig{
Offset: 0,
Limit: 0,
Timeout: 60,
},
Debug: true,
})
}