Documentation ¶
Index ¶
- Variables
- func ChooseName(user *tb.User, others []*tb.User) (name string)
- func PlayerHTML(cs *chatstate.ChatState, user *tb.User) string
- func PlayersHTML(cs *chatstate.ChatState, users []*tb.User) []string
- func UserNames(user *tb.User) (names []string)
- type Bot
- func (b *Bot) ChatStateMessage(cs *chatstate.ChatState) (what string, options []interface{})
- func (b *Bot) OnAbout(m *tb.Message)
- func (b *Bot) OnAboutID(m *tb.Message)
- func (b *Bot) OnAboutName(m *tb.Message)
- func (b *Bot) OnAboutPic(m *tb.Message)
- func (b *Bot) OnBtnBegin(c *tb.Callback)
- func (b *Bot) OnBtnJoin(c *tb.Callback)
- func (b *Bot) OnBtnLeave(c *tb.Callback)
- func (b *Bot) OnPlay(m *tb.Message)
- func (b *Bot) OnRules(m *tb.Message)
- func (b *Bot) OnStart(m *tb.Message)
- func (b *Bot) OnTopics(m *tb.Message)
- func (b *Bot) Post(to tb.Recipient, what interface{}, options ...interface{}) (*tb.Message, bool)
- func (b *Bot) PostChatState(chat *tb.Chat, cs *chatstate.ChatState)
- func (b *Bot) Setup()
- func (b *Bot) UpdateChatState(cs *chatstate.ChatState)
- type ChatStateMap
- type LocalChatStateMap
- type LocalChatStateMapItem
Constants ¶
This section is empty.
Variables ¶
View Source
var EscapeHTML = strings.NewReplacer(`<`, "<", `>`, ">", `&`, "&").Replace
Functions ¶
Types ¶
type Bot ¶
type Bot struct { *tb.Bot Chats ChatStateMap BtnJoin tb.InlineButton BtnLeave tb.InlineButton BtnBegin tb.InlineButton }
func (*Bot) ChatStateMessage ¶
func (*Bot) OnAboutName ¶
func (*Bot) OnAboutPic ¶
func (*Bot) OnBtnBegin ¶
func (*Bot) OnBtnLeave ¶
func (*Bot) UpdateChatState ¶
type ChatStateMap ¶
type LocalChatStateMap ¶
func NewLocalChatStateMap ¶
func NewLocalChatStateMap() *LocalChatStateMap
Click to show internal directories.
Click to hide internal directories.