FunkyBot/cogs/commands.py
Funky Waddle 9d56d9ccc5 initial
2025-06-16 03:06:06 -05:00

24 lines
662 B
Python

from discord.ext import commands
from libs.Cog import Cog
class Commands(Cog):
def __init__(self, bot):
super().__init__(bot)
self.messages_deletable = True
@commands.command()
async def commands(self, ctx):
current_cmds = []
for cog in self.bot.cogs:
if cog != "Commands":
cg = self.bot.get_cog(cog)
cmds = cg.get_commands()
current_cmds.append(f"/{c.name} - {c.description}" for c in cmds)
await ctx.author.send("\n".join(current_cmds))
await self.delete_message(ctx.message)
async def setup(bot):
await bot.add_cog(Commands(bot))