From 3c18d552c2c9eb15834b33687915a7b16c98883b Mon Sep 17 00:00:00 2001 From: Parker Date: Sat, 25 Jan 2025 22:58:41 -0600 Subject: reupload --- code/cogs/help.py | 158 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 158 insertions(+) create mode 100644 code/cogs/help.py (limited to 'code/cogs/help.py') diff --git a/code/cogs/help.py b/code/cogs/help.py new file mode 100644 index 0000000..4c6fd82 --- /dev/null +++ b/code/cogs/help.py @@ -0,0 +1,158 @@ +import discord +from discord.ext import commands +import re +from discord import app_commands + +from global_variables import BOT_COLOR + + +class HelpDropdown(discord.ui.Select): + def __init__(self): + + options = [ + discord.SelectOption(label='Economy', description='add, profile, shop, blackjack, slots, leaderboard', emoji="💰"), + discord.SelectOption(label='Moderation', description='mute, tempmute, unmute, kick, ban, softban, purge', emoji="⚔️"), + discord.SelectOption(label='Info', description='prices, crypto, covid, invite, userinfo, botinfo, vote, bug, feedback, ping', emoji="❓"), + discord.SelectOption(label='Music', description='play, skip, queue, remove, stop, clear, repeat, shuffle, nowplaying, pause, remove', emoji='🎵'), + discord.SelectOption(label='Admin', description='setmute, muterole, delmute', emoji="⚙️"), + ] + + super().__init__(placeholder='Choose a category...', min_values=1, max_values=1, options=options) + + async def callback(self, interaction: discord.Interaction): + if self.values[0] == 'Economy': + embed = discord.Embed( + title=":moneybag: - Economy Help", + description="**Options in `<>` are mandatory**", + color=BOT_COLOR + ) + embed.add_field(name="**Add**", value=f"**Usage: `/add`**\nGives you $10,000. Can be run every 2 hours", inline=False) + embed.add_field(name="**Work**", value=f"**Usage: `/Work`**\nGives you an amount of money between $1,000 and $5,000.", inline=False) + embed.add_field(name="**Shop**", value=f"**Usage: `/shop`**\nGives you the shop menus so that you can buy items", inline=False) + embed.add_field(name="**Blackjack**", value=f"**Usage: `/blackjack `**\nAllows you to play blackjack with the amount of money bet", inline=False) + embed.add_field(name="**Slots**", value=f"**Usage: `/slots `**\nTake your chances on the slots with a bet of your choice.", inline=False) + embed.add_field(name="**Profile**", value=f"**Usage: `/profile `**\nShows the amount of money and ranks that a user has", inline=False), + embed.add_field(name="**Leaderboard**", value=f"**Usage: `/leaderboard` **\nShows the top 5 players with the most money. This is a global leaderboard and not per server.", inline=False) + await interaction.response.edit_message(embed=embed) + + if self.values[0] == 'Moderation': + embed = discord.Embed( + title=":crossed_swords: - Moderation Help", + description="**Options in `<>` are mandatory**", + color=BOT_COLOR + ) + embed.add_field(name="**Warn**", value=f"**Usage: `/warn `** \nWarn a member for doing something against the rules.", inline=True) + embed.add_field(name="**Delwarn**", value=f"**Usage: `/delwarn `** \nDelete a warning from a member so that it is no longer on their record.", inline=True) + embed.add_field(name="**Warnings**", value=f"**Usage: `/warnings `** \nSee all of the warnings for a member. Also includes when they were warned, and who warned them.", inline=True) + embed.add_field(name="**Mute**", value=f"**Usage: `/mute