help.py
help.py
class Help(commands.Cog):
def __init__(self, bot):
self.bot = bot
@commands.command(name="help")
async def help_command(self, ctx):
await self.send_help_message(ctx)
options = [
discord.SelectOption(label="Home", emoji="🏠", description="Go back to
the main help menu"),
discord.SelectOption(label="Antinuke", emoji=antinuke_emoji,
description="View Antinuke commands"),
discord.SelectOption(label="Automod", emoji=automod_emoji,
description="View Automod commands"),
discord.SelectOption(label="Fun", emoji=fun_emoji, description="View
Fun commands"),
discord.SelectOption(label="Giveaway", emoji=giveaway_emoji,
description="View Giveaway commands"),
discord.SelectOption(label="Ignore", emoji=ignore_emoji,
description="View Ignore commands"), # Changed to EMOJI_CROSS
discord.SelectOption(label="Moderation", emoji=moderation_emoji,
description="View Moderation commands"),
discord.SelectOption(label="Utility", emoji=utility_emoji,
description="View Utility commands"),
discord.SelectOption(label="Ticket", emoji=ticket_emoji,
description="View Ticket commands"),
discord.SelectOption(label="Custom Roles", emoji=roles_emoji,
description="View Custom Roles commands"),
discord.SelectOption(label="TempVoice", emoji=mic_emoji,
description="View TempVoice commands"),
discord.SelectOption(label="Autoreact", emoji=autoreact_emoji,
description="View Autoreact commands"),
discord.SelectOption(label="Translate", emoji=translate_emoji,
description="View Translate commands"),
]
if selected_category == "Home":
await interaction.response.edit_message(embed=main_embed,
view=view)
return
category_commands = {
"Antinuke": """
?antinuke on → Enable Antinuke protection
?antinuke off → Disable Antinuke protection
?wl @user → Whitelist a user
?lc #channel → Set log channel
""",
"Automod": """
?automod on → Enable Automod
?automod off → Disable Automod
?blacklist word → Add a word to the blacklist
?whitelist word → Remove a word from the blacklist
""",
"Fun": """
?roast @user → Roast a user
?joke → Get a random joke
?fact → Get a random fun fact
?avatar @user → Show a user's avatar
?coinflip → Flip a coin
?8ball <question> → Ask the magic 8-ball
""",
"Giveaway": """
?giveaway start → Start a giveaway
?giveaway reroll → Reroll a giveaway
?giveaway end → End a giveaway
""",
"Ignore": """
?ignore channel → Ignore a channel
?unignore channel → Unignore a channel
""",
"Moderation": """
?ban @user → Ban a user
?unban userID → Unban a user
?kick @user → Kick a user
?mute @user → Mute a user
?unmute @user → Unmute a user
?purge 10 → Delete 10 messages
?purge user @user 10 → Delete 10 messages from a user
?purge bots → Delete bot messages
""",
"Utility": """
?afk <reason> → Set AFK status
?role @user @role → Add/remove a role
?rolelist @role → List members with a role
?roleicon @role <emoji> → Set a role icon
?data @user → Get user info
?badges → Show your badges
?ping → Check bot's latency
?prefix → Show current bot prefix
?prefix set <prefix> → Change bot prefix
?stats → Show bot statistics
?steal <emoji> → Steal an emoji
""",
"Ticket": """
?ticket create → Create a ticket
?ticket close → Close a ticket
?ticket add @user → Add a user to a ticket
?ticket remove @user → Remove a user from a ticket
""",
"Custom Roles": """
?role create <name> → Create a custom role
?role delete <role> → Delete a custom role
?role color <role> <hex> → Change a role's color
""",
"TempVoice": """
?voice create → Create a temporary voice channel
?voice limit <number> → Set a user limit
?voice name <name> → Change the channel name
""",
"Autoreact": """
?autoreact add <trigger> <emoji> → Add an auto-reaction
?autoreact remove <trigger> → Remove an auto-reaction
?autoreact list → List all auto-reactions
""",
"Translate": """
?translate <language> <text> → Translate text
?translate list → List supported languages
"""
}
new_embed = discord.Embed(
title=f"{selected_category} Commands",
description=category_commands[selected_category],
color=discord.Color.random()
)
await interaction.response.edit_message(embed=new_embed, view=view)
select.callback = select_callback
view = View()
view.add_item(select)
view.add_item(button_invite)
view.add_item(button_support)