Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WClient ¶
type WClient interface {
AccountsLength() int
PingClientDB(_report bool)
DeleteCollection(database dbTypes.DATABASE, collection dbTypes.COLLECTION) wa.RESULT
Destroy()
GetWotoConfiguration() wa.RESULT
GetPatList() (wa.RESULT, []bson.M)
GetHPatList() (wa.RESULT, []bson.M)
ResetWotoConfiguration() wa.RESULT
ResetUsersCollection() wa.RESULT
CreateNewConfiguration() wa.RESULT
CreateNewAccount() wa.RESULT
AddSudo(id int64, nick string) wa.RESULT
RemSudo(id int64) wa.RESULT
AddPat(patID string, t int32) (wa.RESULT, []bson.M)
AddHPat(patID string, t int32) (wa.RESULT, []bson.M)
RemovePat(patID string) (wa.RESULT, []bson.M)
RemoveHPat(patID string) (wa.RESULT, []bson.M)
FindAccount(_username, _pass *string) wa.RESULT
DeleteAccount() wa.RESULT
UpdateAccount() wa.RESULT
UpdateAccountOnlineToken() wa.RESULT
}
type WSettings ¶
type WSettings interface {
GetObt() string
GetAPI() *tgbot.BotAPI
IsGlobal() bool
GetSudoList() []primitive.M
IsSudo(id int64) bool
IsMainSudo(id int64) bool
GetWClient() WClient
GetPatClient() WClient
GetGClient() (*tg.Client, *context.Context)
SetAPI(_api *tgbot.BotAPI)
SetSudoList(list []primitive.M)
SetTObt(_obt string)
SetMainSudo(id int64)
AddSudo(id int64, nick string) wa.RESULT
RemSudo(id int64) wa.RESULT
SendSudo(str string)
// set the main w client.
SetWClient(_client WClient)
// set the pat db client.
SetPatClient(client WClient)
// set the Gclient. a client for do special actions
// using mtproto.
// like getting information of a user by its username.
SetGClient(g *tg.Client, ctx *context.Context)
}
Click to show internal directories.
Click to hide internal directories.