Documentation ¶
Index ¶
- func CallbackInfo(upd tgbotapi.Update, bot *tgbotapi.BotAPI)
- func ConfirmBan(upd tgbotapi.Update, bot *tgbotapi.BotAPI)
- func ControlChannelHelp(upd tgbotapi.Update, bot *tgbotapi.BotAPI)
- func DebugShowID(upd tgbotapi.Update, bot *tgbotapi.BotAPI)
- func DisplayAliases(upd tgbotapi.Update, bot *tgbotapi.BotAPI)
- func DisplayWarnings(upd tgbotapi.Update, bot *tgbotapi.BotAPI)
- func E621IDLookup(id string) string
- func E621MD5Lookup(id string) string
- func FALookup(id string) string
- func FNLookup(id string) int
- func FindUserByUserID(upd tgbotapi.Update, bot *tgbotapi.BotAPI)
- func FindUserByUsername(upd tgbotapi.Update, bot *tgbotapi.BotAPI)
- func GetBotStatus(upd tgbotapi.Update, bot *tgbotapi.BotAPI)
- func GetE621IDRating(upd tgbotapi.Update, bot *tgbotapi.BotAPI)
- func GetE621MD5Rating(upd tgbotapi.Update, bot *tgbotapi.BotAPI)
- func GetFARating(upd tgbotapi.Update, bot *tgbotapi.BotAPI)
- func GetFNRating(upd tgbotapi.Update, bot *tgbotapi.BotAPI)
- func GetUserInfoResponse(user *models.ChatUser) tgbotapi.MessageConfig
- func HandleUsers(upd tgbotapi.Update, bot *tgbotapi.BotAPI)
- func InitBot(botToken string)
- func LookupAlias(upd tgbotapi.Update, bot *tgbotapi.BotAPI)
- func MainChannelHelp(upd tgbotapi.Update, bot *tgbotapi.BotAPI)
- func MakeAliasInlineKeyboard(aliases []models.ChatUser) tgbotapi.InlineKeyboardMarkup
- func MakeBanConfirmInlineKeyboard(userId int64) tgbotapi.InlineKeyboardMarkup
- func MakeBanInlineKeyboard(userId int64) tgbotapi.InlineKeyboardMarkup
- func MakeUserInfoInlineKeyboard(userId int64) tgbotapi.InlineKeyboardMarkup
- func MakeUserInfoInlineKeyboardRefreshAliasButton(userId int64, curAliasPage int64, aliasPagesTotal int64) tgbotapi.InlineKeyboardMarkup
- func MakeUserInfoInlineKeyboardRefreshWarnButton(userId int64) tgbotapi.InlineKeyboardMarkup
- func PreBan(upd tgbotapi.Update, bot *tgbotapi.BotAPI)
- func PreConfirmBan(upd tgbotapi.Update, bot *tgbotapi.BotAPI)
- func ProcessCallback(upd tgbotapi.Update, bot *tgbotapi.BotAPI)
- func ProcessMessage(upd tgbotapi.Update, bot *tgbotapi.BotAPI)
- func Register(regexIn string, chanIn int64, ...)
- func RegisterCallback(regexIn string, handleFunc func(tgbotapi.Update, *tgbotapi.BotAPI))
- func SummonMods(upd tgbotapi.Update, bot *tgbotapi.BotAPI)
- func TestCmd(updateIn tgbotapi.Update, botIn *tgbotapi.BotAPI)
- func ToggleMods(upd tgbotapi.Update, bot *tgbotapi.BotAPI)
- func WarnUserByID(upd tgbotapi.Update, bot *tgbotapi.BotAPI)
- func WarnUserByUsername(upd tgbotapi.Update, bot *tgbotapi.BotAPI)
- func YesOrNo(upd tgbotapi.Update, bot *tgbotapi.BotAPI)
- type BotCommand
- type FurryNetwork
- type MemberCommand
- type StringRating
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CallbackInfo ¶
Callback handler to update a find by alias request after a user button is clicked
func ConfirmBan ¶
Handles the callback when the user presses the final ban confirmation button
func ControlChannelHelp ¶
Help response for control channel
func DebugShowID ¶
DebugShowID helps in getting channel IDs.
func DisplayAliases ¶
Callback handler to update a get user info response to add all known user aliases
func DisplayWarnings ¶
Callback handler to update a get user info response to add warnings for the user
func E621IDLookup ¶
func E621MD5Lookup ¶
func FindUserByUserID ¶
Get user information by telegram ID
func FindUserByUsername ¶
Get user information by username
func GetBotStatus ¶
Returns uptime of the bot
func GetE621IDRating ¶
Handles normal E621 links
func GetE621MD5Rating ¶
Handles direct image E621 links
func GetFARating ¶
Handles furaffinity links
func GetFNRating ¶
Handles furry network links
func GetUserInfoResponse ¶
func GetUserInfoResponse(user *models.ChatUser) tgbotapi.MessageConfig
Helper method to generate the response object for the info requests
func HandleUsers ¶
Handles non-command messages to record user information/changes
func LookupAlias ¶
Look up users by their alias
func MainChannelHelp ¶
Help response for main channel
func MakeAliasInlineKeyboard ¶
func MakeAliasInlineKeyboard(aliases []models.ChatUser) tgbotapi.InlineKeyboardMarkup
Helper method to generate the buttons for the lookup by alias command
func MakeBanConfirmInlineKeyboard ¶
func MakeBanConfirmInlineKeyboard(userId int64) tgbotapi.InlineKeyboardMarkup
Helper method to generate the buttons for the final ban request
func MakeBanInlineKeyboard ¶
func MakeBanInlineKeyboard(userId int64) tgbotapi.InlineKeyboardMarkup
Helper method to generate the buttons for a pre ban request
func MakeUserInfoInlineKeyboard ¶
func MakeUserInfoInlineKeyboard(userId int64) tgbotapi.InlineKeyboardMarkup
Helper method to generate the buttons for an initial info request
func MakeUserInfoInlineKeyboardRefreshAliasButton ¶
func MakeUserInfoInlineKeyboardRefreshAliasButton(userId int64, curAliasPage int64, aliasPagesTotal int64) tgbotapi.InlineKeyboardMarkup
Helper method to generate the buttons for an info request after view aliases button is pressed
func MakeUserInfoInlineKeyboardRefreshWarnButton ¶
func MakeUserInfoInlineKeyboardRefreshWarnButton(userId int64) tgbotapi.InlineKeyboardMarkup
Helper method to generate the buttons for an info request after view warnings button is pressed
func PreConfirmBan ¶
Handles the callback when a user presses the first confirm ban button
func RegisterCallback ¶
func SummonMods ¶
Handles the /mods command
func ToggleMods ¶
Handles toggling of a user's ability to use /mods
func WarnUserByID ¶
Warn a user by telegram ID
func WarnUserByUsername ¶
Warn a user by username
Types ¶
type BotCommand ¶
type FurryNetwork ¶
type FurryNetwork struct {
Rating int `json:"rating"`
}
type MemberCommand ¶
type StringRating ¶
type StringRating struct {
Rating string `json:"rating"`
}