Skip to content

Commit f2e56e6

Browse files
JannesT3011Pingsy
authored andcommitted
Adding help command
1 parent 3e22722 commit f2e56e6

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

cogs/help.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
from discord.ext import commands
2+
from discord import Embed
3+
4+
5+
class Help(commands.Cog):
6+
def __init__(self, bot):
7+
self.bot = bot
8+
9+
@commands.command(name="help")
10+
async def _help(self, ctx):
11+
cat = ["`message`", "`reaction`", "`bot-requests`", "``userjoins", "`userlaves`", "`mentions`", "`bot-msg`"]
12+
embed = Embed(title=f"{self.bot.user.name} ~ Help")
13+
embed.add_field(name="`stats`", value="Shows general stats", inline=False),
14+
embed.add_field(name="`analyze`", value="Analyze a specific category:\n"f" \n".join(cat))
15+
16+
return await ctx.send(embed=embed)
17+
18+
19+
def setup(bot):
20+
bot.remove_command("help")
21+
bot.add_cog(Help(bot))

core/bot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from core.database import DbClient
44
from CONFIG import TOKEN
55

6-
COGS = ["dataminer.message", "dataminer.reaction", "dataminer.member", "util.guild_event", "cogs.stats", "cogs.analysis"]
6+
COGS = ["dataminer.message", "dataminer.reaction", "dataminer.member", "util.guild_event", "cogs.stats", "cogs.analysis", "cogs.help"]
77

88

99
async def run():

0 commit comments

Comments
 (0)