Skip to content

Callback Queries

This page documents all inline button callback handlers in Alita Robot.

  • Total Callbacks: 21
  • Modules with Callbacks: 14

Callbacks use a prefix-based routing system:

{prefix}{data}

For example: restrict.ban.123456789 routes to the restrict. handler with data ban.123456789.

ModulePrefixHandler
Bansrestrict.restrictButtonHandler
Bansunrestrict.unrestrictButtonHandler
BlacklistsrmAllBlacklistbuttonHandler
Captchacaptcha_refresh.captchaRefreshCallback
Captchacaptcha_verify.captchaVerifyCallback
Connectionsconnbtns.connectionButtons
Filtersfilters_overwrite.filterOverWriteHandler
FiltersrmAllFiltersfiltersButtonHandler
Formattingformatting.formattingHandler
Greetingsjoin_request.joinRequestHandler
Helpaboutabout
HelpconfigurationbotConfig
HelphelpqhelpButtonHandler
Languageschange_language.langBtnHandler
Notesnotes.overwrite.noteOverWriteHandler
NotesrmAllNotesnotesButtonHandler
PinsunpinallbtnunpinallCallback
PurgesdeleteMsg.deleteButtonHandler
Reportsreport.markResolvedButtonHandler
WarnsrmAllChatWarnswarnsButtonHandler
WarnsrmWarnrmWarnButton
  • Handler: restrictButtonHandler
  • Source: bans.go
  • Handler: unrestrictButtonHandler
  • Source: bans.go
  • Handler: buttonHandler
  • Source: blacklists.go
  • Handler: captchaRefreshCallback
  • Source: captcha.go
  • Handler: captchaVerifyCallback
  • Source: captcha.go
  • Handler: connectionButtons
  • Source: connections.go
  • Handler: filterOverWriteHandler
  • Source: filters.go
  • Handler: filtersButtonHandler
  • Source: filters.go
  • Handler: formattingHandler
  • Source: formatting.go
  • Handler: joinRequestHandler
  • Source: greetings.go
  • Handler: about
  • Source: help.go
  • Handler: botConfig
  • Source: help.go
  • Handler: helpButtonHandler
  • Source: help.go
  • Handler: langBtnHandler
  • Source: language.go
  • Handler: noteOverWriteHandler
  • Source: notes.go
  • Handler: notesButtonHandler
  • Source: notes.go
  • Handler: unpinallCallback
  • Source: pins.go
  • Handler: deleteButtonHandler
  • Source: purges.go
  • Handler: markResolvedButtonHandler
  • Source: reports.go
  • Handler: warnsButtonHandler
  • Source: warns.go
  • Handler: rmWarnButton
  • Source: warns.go
dispatcher.AddHandler(handlers.NewCallback(
callbackquery.Prefix("myprefix."),
myModule.myCallbackHandler,
))
func (m moduleStruct) myCallbackHandler(b *gotgbot.Bot, ctx *ext.Context) error {
query := ctx.CallbackQuery
// Parse callback data
data := strings.TrimPrefix(query.Data, "myprefix.")
// Process and answer
query.Answer(b, &gotgbot.AnswerCallbackQueryOpts{
Text: "Action completed",
})
return ext.EndGroups
}