Files
TuneBot/utils/classes.py
T
2021-11-19 21:10:29 +01:00

16 lines
417 B
Python

from typing import Dict
from discord.ext.commands import Cog
from bot import TuneBot
class BaseCog(Cog):
def __init__(self, bot: TuneBot) -> None:
self.bot = bot
slash_descriptions: Dict[str, str] = self.bot.config["slash_descriptions"]
for command in self.walk_commands():
if brief := slash_descriptions.get(command.qualified_name):
command.brief = brief