Versions in this module Expand all Collapse all v1 v1.1.5 Aug 20, 2022 Changes in this version + func Contains(s interface{}, a interface{}) bool + func ListToString(list []string, format string, separator string, and string) string + type API interface + ParseUserID func(u *Update, s string) (int64, error) + Platform func() string + Pull func(*PullConfig) (UpdateChannel, ErrorChannel) + Push func(*Update) (*Update, error) + type APICqhttp struct + APIEndpoint string + AccessToken string + Secret string + WebsocketEndpoint string + func (a *APICqhttp) API(end string, m map[string]interface{}) (interface{}, error) + func (a *APICqhttp) ParseUserID(u *Update, s string) (int64, error) + func (a *APICqhttp) Platform() string + func (a *APICqhttp) Pull(pc *PullConfig) (UpdateChannel, ErrorChannel) + func (a *APICqhttp) Push(update *Update) (*Update, error) + type APITelegramBot struct + Offset int64 + Token string + func (a *APITelegramBot) API(end string, m map[string]interface{}) (interface{}, error) + func (a *APITelegramBot) ParseUserID(u *Update, s string) (int64, error) + func (a *APITelegramBot) Platform() string + func (a *APITelegramBot) Pull(pc *PullConfig) (UpdateChannel, ErrorChannel) + func (a *APITelegramBot) Push(update *Update) (*Update, error) + type Bot struct + API *API + BotMaid *BotMaid + ID string + Self *User + type BotMaid struct + Bots map[string]*Bot + Commands CommandSlice + Conf *botMaidConfig + Helps []*Help + Redis *redis.Client + SubEntries []string + Timers []*Timer + Words map[string]string + func New(configFile string) (*BotMaid, error) + func (bm *BotMaid) AddCommand(c *Command) + func (bm *BotMaid) AddTimer(t *Timer) + func (bm *BotMaid) At(u *User) string + func (bm *BotMaid) BeAt(u *Update) bool + func (bm *BotMaid) Broadcast(key string, m *Message) + func (bm *BotMaid) Delete(u *Update) (*Update, error) + func (bm *BotMaid) HelpCommandDo(u *Update, f *pflag.FlagSet) bool + func (bm *BotMaid) HelpRespCommandDo(u *Update, f *pflag.FlagSet) bool + func (bm *BotMaid) IsBanned(c *Chat) bool + func (bm *BotMaid) IsMaster(u *User) bool + func (bm *BotMaid) MasterCommandDo(u *Update, f *pflag.FlagSet) bool + func (bm *BotMaid) Reply(u *Update, s string) (*Update, error) + func (bm *BotMaid) ReplyType(u *Update, s, t string) (*Update, error) + func (bm *BotMaid) Start() error + func (bm *BotMaid) SubscribeCommandDo(u *Update, f *pflag.FlagSet) bool + func (bm *BotMaid) VersetCommandDo(u *Update, f *pflag.FlagSet) bool + func (bm *BotMaid) VersetCommandHelpSetFlag(f *pflag.FlagSet) + func (bm *BotMaid) VersionCommandDo(u *Update, f *pflag.FlagSet) bool + func (bm *BotMaid) VersionCommandHelpSetFlag(f *pflag.FlagSet) + type Chat struct + ID int64 + Title string + Type string + Update *Update + type Command struct + Do func(*Update, *pflag.FlagSet) bool + Help *Help + Priority int + type CommandSlice []*Command + func (cs CommandSlice) Len() int + func (cs CommandSlice) Less(i, j int) bool + func (cs CommandSlice) Swap(i, j int) + type ErrorChannel chan error + type Help struct + Comment string + Help string + Menu string + Names []string + SetFlag func(*pflag.FlagSet) + Usage string + type Message struct + Args []string + Command string + Content string + Flags map[string]*pflag.FlagSet + ID int64 + Type string + Update *Update + type PullConfig struct + Limit int + RetryWaitingTime time.Duration + Timeout int + type Timer struct + Do func() + End time.Time + Frequency time.Duration + Start time.Time + type Update struct + Bot *Bot + Chat *Chat + ID int64 + Message *Message + Time time.Time + Type string + User *User + type UpdateChannel chan *Update + type User struct + ID int64 + NickName string + Update *Update + UserName string