umi/cogs/mumble.py.disabled

25 lines
658 B
Plaintext
Raw Normal View History

2022-06-23 05:09:34 +00:00
import discord
from discord.ext.commands import Cog
from os import getenv, path, makedirs
import logging
if not path.exists('.logs'):
makedirs('.logs')
logger = logging.getLogger(__name__)
logger.setLevel(logging.WARNING)
fh = logging.FileHandler('.logs/mumble.log')
formatter = logging.Formatter('%(asctime)s | %(name)s | [%(levelname)s] %(message)s', '%Y-%m-%d %H:%M:%S')
fh.setFormatter(formatter)
if not len(logger.handlers):
logger.addHandler(fh)
def setup(bot: discord.Bot):
bot.add_cog(Mumble(bot))
class Mumble(Cog):
"""Bridge to Mumble"""
def __init__(self, bot: discord.Bot):
self.bot: discord.Bot = bot
print("Initialized Music cog")