Documentation
¶
Index ¶
- func App_enter()
- func App_exit()
- func GetExisting() interfaces.WSettings
- func GetSettings() interfaces.WSettings
- func IsRunning() bool
- type AppSettings
- func (_s *AppSettings) AddSudo(id int64, nick string) wa.RESULT
- func (_s *AppSettings) GetAPI() *tgbotapi.BotAPI
- func (_s *AppSettings) GetGClient() (*tg.Client, *context.Context)
- func (_s *AppSettings) GetIndex() int
- func (_s *AppSettings) GetObt() string
- func (_s *AppSettings) GetPatClient() interfaces.WClient
- func (_s *AppSettings) GetSudoList() []primitive.M
- func (_s *AppSettings) GetTotalIndex() int
- func (_s *AppSettings) GetWClient() interfaces.WClient
- func (_s *AppSettings) IsGlobal() bool
- func (_s *AppSettings) IsMainSudo(id int64) bool
- func (_s *AppSettings) IsSudo(id int64) bool
- func (_s *AppSettings) RemSudo(id int64) wa.RESULT
- func (_s *AppSettings) SendSudo(str string)
- func (_s *AppSettings) SetAPI(_api *tgbot.BotAPI)
- func (_s *AppSettings) SetGClient(g *tg.Client, ctx *context.Context)
- func (_s *AppSettings) SetIndex(_index int)
- func (_s *AppSettings) SetMainSudo(id int64)
- func (_s *AppSettings) SetPatClient(client interfaces.WClient)
- func (_s *AppSettings) SetSudoList(list []primitive.M)
- func (_s *AppSettings) SetTObt(_obt string)
- func (_s *AppSettings) SetWClient(_client interfaces.WClient)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetExisting ¶
func GetExisting() interfaces.WSettings
func GetSettings ¶
func GetSettings() interfaces.WSettings
Types ¶
type AppSettings ¶
type AppSettings struct {
// contains filtered or unexported fields
}
func (*AppSettings) GetAPI ¶
func (_s *AppSettings) GetAPI() *tgbotapi.BotAPI
func (*AppSettings) GetGClient ¶
func (_s *AppSettings) GetGClient() (*tg.Client, *context.Context)
func (*AppSettings) GetIndex ¶
func (_s *AppSettings) GetIndex() int
GetIndex will give you the index of the current child. please notice that this value is zero-based.
func (*AppSettings) GetObt ¶
func (_s *AppSettings) GetObt() string
func (*AppSettings) GetPatClient ¶
func (_s *AppSettings) GetPatClient() interfaces.WClient
func (*AppSettings) GetSudoList ¶
func (_s *AppSettings) GetSudoList() []primitive.M
func (*AppSettings) GetTotalIndex ¶
func (_s *AppSettings) GetTotalIndex() int
GetTotalIndex will give you the total index of childs. please notice that this value is NOT zero-based.
func (*AppSettings) GetWClient ¶
func (_s *AppSettings) GetWClient() interfaces.WClient
func (*AppSettings) IsGlobal ¶
func (_s *AppSettings) IsGlobal() bool
func (*AppSettings) IsMainSudo ¶
func (_s *AppSettings) IsMainSudo(id int64) bool
func (*AppSettings) IsSudo ¶
func (_s *AppSettings) IsSudo(id int64) bool
func (*AppSettings) SendSudo ¶
func (_s *AppSettings) SendSudo(str string)
SendSudo, will send a message to the superuser of the bot.
func (*AppSettings) SetAPI ¶
func (_s *AppSettings) SetAPI(_api *tgbot.BotAPI)
func (*AppSettings) SetGClient ¶
func (_s *AppSettings) SetGClient(g *tg.Client, ctx *context.Context)
func (*AppSettings) SetIndex ¶
func (_s *AppSettings) SetIndex(_index int)
func (*AppSettings) SetMainSudo ¶
func (_s *AppSettings) SetMainSudo(id int64)
func (*AppSettings) SetPatClient ¶
func (_s *AppSettings) SetPatClient(client interfaces.WClient)
func (*AppSettings) SetSudoList ¶
func (_s *AppSettings) SetSudoList(list []primitive.M)
SetSudoList will set the sudo list. sudo_id = the user id of sudo. (int64) sudo_date = the date which it becomes sudo. (see time) sudo_nickname = the nickname of sudo. (string)
func (*AppSettings) SetTObt ¶
func (_s *AppSettings) SetTObt(_obt string)
func (*AppSettings) SetWClient ¶
func (_s *AppSettings) SetWClient(_client interfaces.WClient)
Click to show internal directories.
Click to hide internal directories.