Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[info] Add /tutorial command #490

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions ballsdex/packages/info/cog.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

from .license import LicenseInfo
Expand Down Expand Up @@ -169,3 +171,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)
Loading