1
0
mirror of https://github.com/fumiama/ReiBot.git synced 2026-06-06 01:20:24 +08:00
Files
ReiBot/example/main.go
源文雨 72390b4c09 add more
2022-06-10 19:58:48 +08:00

26 lines
493 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.Caller.Send(tgba.NewMessage(ctx.Message.Chat.ID, "echo string"))
})
rei.Run(rei.Bot{
Token: "",
Buffer: 256,
UpdateConfig: tgba.UpdateConfig{
Offset: 0,
Limit: 0,
Timeout: 60,
},
Debug: true,
})
}