refactor: add config.py
this change adds self validation in __init__, allows to make config values with different types (not just string) and stores config values in classes for easier accessibility Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
This commit is contained in:
parent
768f9abdcf
commit
5262975275
5 changed files with 57 additions and 35 deletions
|
@ -4,13 +4,13 @@
|
|||
Token =
|
||||
; (Optional) URL for "source code" button in /about.
|
||||
; If not set, button will not appear in "about" menu.
|
||||
SourceUrl =
|
||||
SourceUrl = git.mctaylors.ru
|
||||
|
||||
[App]
|
||||
; Application name (e.g. Danbooru).
|
||||
Name = Danbooru
|
||||
; Host (without http://) used to access the application API.
|
||||
Host = danbooru.donmai.us
|
||||
Host = stashboo.ru
|
||||
; (Optional) Public host name (without http://) for the “Open in [App.Name]” button.
|
||||
; Useful if the bot is hosted on the same server as the application.
|
||||
; If not set, [App.Host] will be used instead.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue