diff --git a/brahmos.py b/brahmos.py index 927a47b..14d5879 100644 --- a/brahmos.py +++ b/brahmos.py @@ -166,7 +166,7 @@ class Main(commands.Cog): async def mem(self, ctx): await ctx.send(f"{round(Process(getpid()).memory_info().rss/1024/1024, 2)} MB") - @commands.command(name="showexts", hidden=True, aliases=["sex"]) + @commands.command(name="showexts", hidden=True) @commands.is_owner() async def showexts(self, ctx: commands.Context): "show all loaded extensions" diff --git a/exts/misc.py b/exts/misc.py new file mode 100644 index 0000000..41a5965 --- /dev/null +++ b/exts/misc.py @@ -0,0 +1,38 @@ +import datetime +import random +from typing import List, Literal, Optional + +import discord +from botclass import CustomCtx, Brahmos +from discord.ext import commands + + +class Misc(commands.Cog): + def __init__(self, bot: Brahmos): + self.bot = bot + + @commands.command(name="sex") + async def sex(self, ctx: CustomCtx): + """ + sex + """ + await ctx.send("https://tenor.com/view/houshou-marine-sexy-treasure-box-im-your-treasure-box-ride-gif-26351095") + + @commands.command(name="snowflake") + async def snowflake(self, ctx: CustomCtx, snowflake: int): + """ + get snowflake info + """ + snowflake = discord.utils.snowflake_time(snowflake) + embed = discord.Embed( + title="Snowflake Info", + description=f"Snowflake: {snowflake}\n" + f"Date: {snowflake.strftime('%Y-%m-%d %H:%M:%S')}\n" + f"Timestamp: {snowflake.timestamp()}", + color=0x2F3136, + ) + await ctx.send(embed=embed) + + +async def setup(bot: commands.Bot): + await bot.add_cog(Misc(bot))