From 0e1111ebc118d3893a806b4dffd919e9245fd7b8 Mon Sep 17 00:00:00 2001 From: Rowan Dash Date: Thu, 8 Aug 2024 21:36:10 +0100 Subject: [PATCH] feat: old changes --- src/discord_bot/commands/exp/__init__.py | 26 ++++++++++++++++++++++++ src/discord_bot/commands/exp/levels.py | 19 +++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 src/discord_bot/commands/exp/__init__.py create mode 100644 src/discord_bot/commands/exp/levels.py diff --git a/src/discord_bot/commands/exp/__init__.py b/src/discord_bot/commands/exp/__init__.py new file mode 100644 index 0000000..3103648 --- /dev/null +++ b/src/discord_bot/commands/exp/__init__.py @@ -0,0 +1,26 @@ +# Logging module +import logging +# Importing subcommands +from .levels import Levels + + +log = logging.getLogger(__name__) + + +class ExpCategory(Levels, name=__name__[9:]): + """ + Full of lots of fun commands + """ + + def __init__(self, client): + self.client = client + Levels.__init__(self, client) + + +def setup(client): + log.debug(f'loading {__name__}') + client.add_cog(ExpCategory(client)) + + +def teardown(client): + log.debug(f'{__name__} unloaded') diff --git a/src/discord_bot/commands/exp/levels.py b/src/discord_bot/commands/exp/levels.py new file mode 100644 index 0000000..3b2f946 --- /dev/null +++ b/src/discord_bot/commands/exp/levels.py @@ -0,0 +1,19 @@ +import logging +from discord.ext import commands +import discord +log = logging.getLogger(__name__) + + +class Levels(commands.Cog): + def __init__(self, client): + self.client = client + + @commands.command() + async def levels(self, ctx: commands.Context): + """ + :return: embed with levels + """ + embed = discord.Embed(color=discord.Color.gold()) + embed.set_image(url="https://cdn.arstechnica.net/wp-content/uploads/2022/03/38097_017.jpg") + + await ctx.send(embed=embed)