diff --git a/ballsdex/packages/info/cog.py b/ballsdex/packages/info/cog.py index ba02b055..7c3ea4ad 100644 --- a/ballsdex/packages/info/cog.py +++ b/ballsdex/packages/info/cog.py @@ -17,6 +17,8 @@ from ballsdex.core.models import balls as countryballs from ballsdex.core.utils.formatting import pagify from ballsdex.core.utils.tortoise import row_count_estimate +from ballsdex.packages.config.cog import Config +from ballsdex.packages.trade.cog import Trade from ballsdex.settings import settings if TYPE_CHECKING: @@ -167,3 +169,66 @@ async def help(self, interaction: discord.Interaction): ) await interaction.response.send_message(embed=embed) + + @app_commands.command() + async def tutorial(self, interaction: discord.Interaction): + """ + View a descriptive tutorial of the bot. + """ + trade_begin = Trade.begin.extras.get("mention", "/trade begin") + trade_add = Trade.add.extras.get("mention", "/trade add") + config_channel = Config.channel.extras.get("mention", "/config channel") + + embed = discord.Embed( + title=f"{settings.bot_name.title()} Tutorial", color=discord.Color.blurple() + ) + + embed.add_field( + name="What can I do with this bot?", + value=( + f"You can collect {settings.plural_collectible_name}, exchange them with friends " + "and build a big and strong collection!" + ), + inline=False, + ) + + embed.add_field( + name="How can I configure the bot?", + value=( + f"To enable the spawning of {settings.plural_collectible_name}, you " + "need to configure the bot. To do that, you need to run the command " + f"{config_channel}. You must have the `Manage Guild` " + "permission to use this command." + ), + inline=False, + ) + + embed.add_field( + name=f"How can I catch {settings.plural_collectible_name} and when do they spawn?", + value=( + f"{settings.plural_collectible_name.title()} spawn depending on the server's " + "activity. If there's high activity, they will spawn more quickly. To catch them," + " tap the blue 'Catch Me' button when one spawns, then guess the name of the " + f"{settings.collectible_name}, and if your guess is correct, the " + f"{settings.collectible_name} will be added to your inventory! Keep in mind, " + f"{settings.plural_collectible_name} are unable of being caught if " + "three minutes pass from the time it spawned." + ), + inline=False, + ) + + embed.add_field( + name=f"How can I exchange {settings.plural_collectible_name}?", + value=( + f"First, you need to begin a trade using {trade_begin}. " + f"Once the trade has started, add the {settings.plural_collectible_name} you " + f"want with the command {trade_add}. Then, tap the button named 'Lock Proposal', " + "and tap the 'Accept' button to end the trade and finish the exchange." + ), + inline=False, + ) + + embed.set_footer(text="We hope you enjoy the bot!") + if self.bot.user and self.bot.user.display_avatar: + embed.set_thumbnail(url=self.bot.user.display_avatar.url) + await interaction.response.send_message(embed=embed, ephemeral=True)