Improved the loading of handlers
This commit is contained in:
4
bot.py
4
bot.py
@@ -4,8 +4,6 @@ import discord
|
||||
import sound
|
||||
import configparser
|
||||
from discord.ext import commands
|
||||
from gqrxHandler import GQRXHandler
|
||||
from op25Handler import OP25Handler
|
||||
|
||||
|
||||
# Init class for bot
|
||||
@@ -60,10 +58,12 @@ class Bot(commands.Bot):
|
||||
def check_handler(self):
|
||||
if self.Handler == "gqrx":
|
||||
print("Starting GQRX handler")
|
||||
from gqrxHandler import GQRXHandler
|
||||
self.GQRXHandler = GQRXHandler()
|
||||
|
||||
elif self.Handler == 'op25':
|
||||
print("Starting OP25 handler")
|
||||
from op25Handler import OP25Handler
|
||||
self.OP25Handler = OP25Handler()
|
||||
|
||||
# Start the bot
|
||||
|
||||
Reference in New Issue
Block a user