Remove catch-all handler.
The webhook issue was due to an incorrectly configured endpoint for the Cloudflare tunnel and not *actually* the bot code.
This commit is contained in:
parent
43d3cdc508
commit
a0c3103d27
1 changed files with 4 additions and 6 deletions
|
|
@ -100,7 +100,10 @@ func (b *bot) AttachHandlers() {
|
|||
tu.InlineKeyboardButton("Go!").WithCallbackData("go"),
|
||||
)),
|
||||
))*/
|
||||
return nil
|
||||
_, err := ctx.Bot().SendMessage(ctx, tu.Message(
|
||||
tu.ID(message.Chat.ID),
|
||||
"This is a help message"))
|
||||
return err
|
||||
}, th.CommandEqual("help"))
|
||||
|
||||
}
|
||||
|
|
@ -305,11 +308,6 @@ func (b *bot) SetWebhook(ctx context.Context, conf *settings.Settings) (err erro
|
|||
return
|
||||
}
|
||||
|
||||
b.handler.HandleMessage(func(ctx *th.Context, message telego.Message) error {
|
||||
fmt.Println("received raw message:", message.Text)
|
||||
return nil
|
||||
})
|
||||
|
||||
go func() {
|
||||
_ = http.ListenAndServe(
|
||||
conf.Service.Webhook.ListenAddr(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue