Documentation ¶
Index ¶
- Constants
- Variables
- func GetLangButtons(command, currentLang string) (row []tgbotapi.InlineKeyboardButton)
- func GetQueryValueFromUrl(inlineQueryText, paramName string) (v string, err error)
- func GetUrlValues(s string) (values url.Values, err error)
- func InitPrizarenaInGameBot(prizarenaGameID, prizarenaToken string, router botsfw.WebhooksRouter)
- func ListTournamentsTelegramInlineButton(t strongo.SingleLocaleTranslator, prizarenaGameID string) []tgbotapi.InlineKeyboardButton
- func NewCachedApi(c context.Context, prizarenaGameID, prizarenaToken string) pacached.Cached
- func NewTournamentTelegramInlineButton(t strongo.SingleLocaleTranslator, prizarenaGameID string) []tgbotapi.InlineKeyboardButton
- func OnStartIfTournamentLink(whc botsfw.WebhookContext, prizarenaGameID, prizarenaToken string) (m botsfw.MessageFromBot, err error)
- func ProcessInlineQueryTournament(whc botsfw.WebhookContext, inlineQuery InlineQueryContext, ...) (m botsfw.MessageFromBot, err error)
- func RenderTournamentCard(c context.Context, cardMode TournamentCardMode, tournament pamodels.Tournament) (m botsfw.MessageFromBot, err error)
- type InlineQueryContext
- type InlineQueryMessageBuilder
- type TournamentCardMode
Constants ¶
View Source
const ( PrizarenaBotStartCommandListTournaments = "list" PrizarenaBotStartCommandNewTournament = "new" )
Variables ¶
View Source
var GetPrizarenaApiClient func(c context.Context) prizarena_interfaces.ApiClient
View Source
var OnStartTournament = botsfw.Command{ Code: onStartTournamentCode, Action: func(whc botsfw.WebhookContext) (m botsfw.MessageFromBot, err error) { return }, }
View Source
var TournamentsCommandCode = "tournaments"
Functions ¶
func GetLangButtons ¶
func GetLangButtons(command, currentLang string) (row []tgbotapi.InlineKeyboardButton)
func GetQueryValueFromUrl ¶
func InitPrizarenaInGameBot ¶
func InitPrizarenaInGameBot(prizarenaGameID, prizarenaToken string, router botsfw.WebhooksRouter)
func ListTournamentsTelegramInlineButton ¶
func ListTournamentsTelegramInlineButton(t strongo.SingleLocaleTranslator, prizarenaGameID string) []tgbotapi.InlineKeyboardButton
func NewCachedApi ¶
func NewTournamentTelegramInlineButton ¶
func NewTournamentTelegramInlineButton(t strongo.SingleLocaleTranslator, prizarenaGameID string) []tgbotapi.InlineKeyboardButton
func OnStartIfTournamentLink ¶
func OnStartIfTournamentLink(whc botsfw.WebhookContext, prizarenaGameID, prizarenaToken string) (m botsfw.MessageFromBot, err error)
func ProcessInlineQueryTournament ¶
func ProcessInlineQueryTournament(whc botsfw.WebhookContext, inlineQuery InlineQueryContext, prizarenaGameID, prizarenaToken, tournamentParamName string, reply InlineQueryMessageBuilder) (m botsfw.MessageFromBot, err error)
func RenderTournamentCard ¶
func RenderTournamentCard(c context.Context, cardMode TournamentCardMode, tournament pamodels.Tournament) (m botsfw.MessageFromBot, err error)
Types ¶
type InlineQueryContext ¶
type InlineQueryMessageBuilder ¶
type InlineQueryMessageBuilder func(tournament pamodels.Tournament) (m botsfw.MessageFromBot, err error)
type TournamentCardMode ¶
type TournamentCardMode int
const ( TournamentCardModeNewMessage TournamentCardMode = iota TournamentCardModeEditCallbackMessage TournamentCardModeInlineQuery )
Click to show internal directories.
Click to hide internal directories.