appSettings

package
v0.0.0-...-f800b22 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 3, 2021 License: GPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func App_enter

func App_enter()

func App_exit

func App_exit()

func GetExisting

func GetExisting() interfaces.WSettings

func GetSettings

func GetSettings() interfaces.WSettings

func IsRunning

func IsRunning() bool

Types

type AppSettings

type AppSettings struct {
	// contains filtered or unexported fields
}

func (*AppSettings) AddSudo

func (_s *AppSettings) AddSudo(id int64, nick string) wa.RESULT

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) RemSudo

func (_s *AppSettings) RemSudo(id int64) wa.RESULT

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL