Miscallaneous cleanups #8

Merged
waifu merged 9 commits from vd15_misc_cleanups into master 2025-05-18 12:46:30 -07:00
3 changed files with 33 additions and 7 deletions
Showing only changes of commit 5cc2ea2267 - Show all commits

1
.gitignore vendored
View file

@ -182,3 +182,4 @@ cython_debug/
# Custom stuff
gacha_game.db
config.ini

View file

@ -1,8 +1,19 @@
# Essential for the bot to function
INSTANCE = "" # Bots Misskey instance's URL **with schema**
KEY = "" # API key for the bot
'''Essentials for the bot to function'''
import configparser
config = configparser.ConfigParser()
config.read('config.ini')
# Username for the bot
USER = config['application']['BotUser']
# API key for the bot
KEY = config['application']['ApiKey']
# Bot's Misskey instance URL
INSTANCE = config['application']['InstanceUrl']
# Extra stuff for control of the bot
ADMINS = [] # Fedi handles in the traditional 'user@domain.tld' style,
# allows these users to use extra admin exclusive commands
# with the bot
# TODO: move this to db
# Fedi handles in the traditional 'user@domain.tld' style, allows these users
# to use extra admin exclusive commands with the bot'''
ADMINS = config['application']['DefaultAdmins']

14
example_config.ini Normal file
View file

@ -0,0 +1,14 @@
; Rename me to config.ini and put your values in here
[application]
; Full fedi handle of the bot user
BotUser = @bot@example.tld
; API key for the bot
; Generate one by going to Settings > API > Generate access token
ApiKey = abcdefghijklmnopqrstuvwxyz012345
; Fully qualified URL of the instance hosting the bot
InstanceUrl = http://example.tld
; Comma separated list of fedi handles for any administrator users
DefaultAdmins = ['admin@example.tld']