manage users in runtime, closes #16

This commit is contained in:
Aine
2022-08-29 21:41:14 +03:00
parent 0ba951fbe6
commit f97ebb604a
7 changed files with 119 additions and 18 deletions

View File

@@ -52,6 +52,11 @@ func (s settings) NoFiles() bool {
return utils.Bool(s.Get(optionNoFiles))
}
// Users is bot/admin option
func (s settings) Users() []string {
return strings.Split(s.Get(botOptionUsers), " ")
}
// Set option
func (s settings) Set(key, value string) {
s[strings.ToLower(strings.TrimSpace(key))] = value