Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
e9fd008bd8 | |||
a3ea311c3e | |||
843b48dfdc |
19
Jenkinsfile
vendored
19
Jenkinsfile
vendored
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
import bot_base
|
||||
from .bot_base import *
|
||||
|
@ -1,20 +1,16 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import importlib
|
||||
import inspect
|
||||
import asyncio
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
import traceback
|
||||
|
||||
import discord
|
||||
import toml
|
||||
from packaging.specifiers import SpecifierSet, InvalidSpecifier
|
||||
from aiohttp import web
|
||||
|
||||
from bot_base.modules import ModuleManager
|
||||
from config import Config, config_types
|
||||
from config.config_types import factory
|
||||
import errors
|
||||
|
||||
__version__ = "0.2.0"
|
||||
|
||||
@ -37,15 +33,20 @@ class BotBase(discord.Client):
|
||||
|
||||
self.config = Config(path=os.path.join(data_folder, "config.toml"))
|
||||
self.config.register("data_folder", factory(config_types.Str))
|
||||
self.config.register("port", factory(config_types.Int))
|
||||
|
||||
self.config.set({
|
||||
"data_folder": data_folder,
|
||||
"port": 8080,
|
||||
}, no_save=True)
|
||||
|
||||
self.config.load()
|
||||
|
||||
self.modules = ModuleManager(self)
|
||||
|
||||
self.webserver = web.Application()
|
||||
self.loop.create_task(web._run_app(self.webserver, port=self.config["port"]), name="webserver")
|
||||
|
||||
async def on_ready(self):
|
||||
self.info("Bot ready.")
|
||||
self.modules.load_modules()
|
||||
|
Loading…
Reference in New Issue
Block a user