FEAT: Added an update module to allow Selena to be deployed

This commit is contained in:
Dan
2024-06-27 11:35:22 -04:00
parent c0dd278cd4
commit d92810b84c
4 changed files with 127 additions and 23 deletions

View File

@@ -1,3 +1,4 @@
# main.py
import discord
from config import config
import logging
@@ -15,7 +16,6 @@ class Selena(discord.Client):
def __init__(self):
super().__init__(intents=intents)
self.tree = discord.app_commands.CommandTree(self)
self.twitch = None
self.load_modules()
async def setup_hook(self):
@@ -59,6 +59,11 @@ class Selena(discord.Client):
twitch = Twitch(self)
twitch.setup(self.tree)
if config['modules']['update']['enabled']:
from modules.admin.update import setup as update_setup
branch_name = config.get('UPDATE_BRANCH', 'dev-rework')
update_setup(self, branch=branch_name)
bot = Selena()