Documentation ¶
Index ¶
Constants ¶
View Source
const ( CallbackTypeRefresh = "Refresh" CallbackTypePassThrough = "PassThrough" CallbackTypeKick = "Kick" CallbackTypeDonateWX = "DonateWX" CallbackTypeDonateAlipay = "DonateAlipay" )
View Source
const ( UserLinkTemplate = `<a href="tg://user?id=%d">%s</a>` EnterRoomMsg = `` /* 324-byte string literal not displayed */ HelpMsg = `` /* 307-byte string literal not displayed */ DonateMsg = `所捐款项将用于: 1. 作者的续命咖啡 ☕️ 2. 支付服务器等设施费用` )
View Source
const ( DefaultCaptchaExpire = 300 * time.Second DefaultRefreshDuration = 75 * time.Second )
View Source
const ( TaskTypeDeleteMsg = "DeleteMsg" TaskTypeUpdateMsgExpire = "UpdateMsgExpire" )
View Source
const ( TaskStatusPlan = iota TaskStatusDoing TaskStatusDone )
Variables ¶
View Source
var Donates = map[string]DonateKV{ CallbackTypeDonateWX: { Key: "微信", URL: "wxp://f2f0OWfabxt-G2eVGJuF9psyiEvqiL3u3gxB", }, CallbackTypeDonateAlipay: { Key: "支付宝", URL: "https://qr.alipay.com/fkx00824kg0dc3tf1sf4c2e", }, }
View Source
var InlineKeyboard = tgbotapi.NewInlineKeyboardMarkup( []tgbotapi.InlineKeyboardButton{ tgbotapi.NewInlineKeyboardButtonData("刷新验证码", CallbackTypeRefresh), tgbotapi.NewInlineKeyboardButtonData("通过验证[管理员]", CallbackTypePassThrough), }, []tgbotapi.InlineKeyboardButton{ tgbotapi.NewInlineKeyboardButtonData("踢出群组[管理员]", CallbackTypeKick), }, )
Functions ¶
func DonatesKeyboard ¶
func DonatesKeyboard(donateType string) tgbotapi.InlineKeyboardMarkup
Types ¶
type InlineKeyboardButtons ¶
type InlineKeyboardButtons []tgbotapi.InlineKeyboardButton
func (InlineKeyboardButtons) Len ¶
func (iBtn InlineKeyboardButtons) Len() int
func (InlineKeyboardButtons) Less ¶
func (iBtn InlineKeyboardButtons) Less(i, j int) bool
func (InlineKeyboardButtons) Swap ¶
func (iBtn InlineKeyboardButtons) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.