Documentation ¶
Index ¶
- Constants
- func NewPayment()
- type Bot
- func (b *Bot) CreateHandlers()
- func (b *Bot) CreateVote() error
- func (b *Bot) GetPinnedMessage(chatID int) (*PinnedMessage, error)
- func (b *Bot) GetVoteResult() string
- func (b *Bot) PinMessage(m *tb.Message) error
- func (b *Bot) SendReminder()
- func (b *Bot) UnpinMessage() error
- func (b *Bot) UpdateVote() error
- type Config
- type PinnedMessage
- type Vote
Constants ¶
View Source
const HelpMessage = `` /* 149-byte string literal not displayed */
HelpMessage - show help message.
Variables ¶
This section is empty.
Functions ¶
func NewPayment ¶
func NewPayment()
Types ¶
type Bot ¶
Bot - represent a separate telegram bot instance.
func (*Bot) CreateHandlers ¶
func (b *Bot) CreateHandlers()
CreateHandlers - create handlers for buttons.
func (*Bot) CreateVote ¶
CreateVote - creating new message for voting.
func (*Bot) GetPinnedMessage ¶
func (b *Bot) GetPinnedMessage(chatID int) (*PinnedMessage, error)
GetPinnedMessage - return pinned message in chat by id.
func (*Bot) GetVoteResult ¶
GetVoteResult - return result of current vote.
func (*Bot) PinMessage ¶
PinMessage - pin message in chat.
func (*Bot) UnpinMessage ¶
UnpinMessage - unpin message in current chat.
type Config ¶
type Config struct { APIToken string Appeals []string Place struct { URL string Location struct { Latitude float64 Longitude float64 } } Formats struct { VoteFormat string ResultFormat string RemindFormat string } NoResult string Weekday int Hour int Minute int Admins []string God string }
Config - telegram bot configuration.
type PinnedMessage ¶
type PinnedMessage struct { ID float64 `json:"message_id"` Date float64 Text string From struct { Username string IsBot bool `json:"is_bot"` } Chat struct { ID float64 } }
PinnedMessage - raw telegram api pinned message.
func (*PinnedMessage) MessageSig ¶
func (pm *PinnedMessage) MessageSig() (string, int64)
MessageSig - to implement telebot.Edditable
Click to show internal directories.
Click to hide internal directories.