mirror of
https://github.com/UiO-Gaming/ShiteMusicBot.git
synced 2026-11-05 13:56:51 +01:00
Added bot.session and bot.APIkeys
This commit is contained in:
1 parent
07bc4582db
commit
ddc0968a2b
2 files changed
+12
-2
No files matched your search
@@ -4,6 +4,7 @@ import time
|
||||
import sys
|
||||
import traceback
|
||||
import yaml
|
||||
import aiohttp
|
||||
|
||||
from discord.ext import commands
|
||||
from discord.ext.commands.view import StringView
|
||||
@@ -17,7 +18,7 @@ from cogs.utils.paginator import Scroller
|
||||
|
||||
|
||||
with codecs.open("data/config.yaml", 'r', encoding='utf8') as f:
|
||||
conf = yaml.safe_load(f)
|
||||
conf = yaml.load(f, Loader=yaml.SafeLoader)
|
||||
|
||||
|
||||
initial_extensions = [
|
||||
@@ -48,8 +49,13 @@ class Bot(commands.Bot):
|
||||
description=conf["bot"]["description"])
|
||||
|
||||
self.settings = Settings(**conf['default server settings'])
|
||||
self.APIkeys = conf.get('APIkeys', {})
|
||||
|
||||
self.localizer = Localizer(conf.get('locale path', "./localization"), conf.get('locale', 'en_en'))
|
||||
self.aliaser = Aliaser(conf.get('locale path', "./localization"), conf.get('locale', 'en_en'))
|
||||
|
||||
self.session = aiohttp.ClientSession(loop=self.loop)
|
||||
|
||||
self.debug = debug
|
||||
|
||||
for extension in initial_extensions:
|
||||
|
||||
@@ -29,4 +29,8 @@ lavalink nodes:
|
||||
port: 2333
|
||||
password: youshallnotpass
|
||||
region: eu
|
||||
name: backup-1
|
||||
name: backup-1
|
||||
|
||||
APIkeys:
|
||||
genius:
|
||||
youtube:
|
||||
Reference in new issue
Block a user