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

Added /help command #44

Closed
wants to merge 2 commits into from
Closed

Added /help command #44

wants to merge 2 commits into from

Conversation

jspmic
Copy link
Collaborator

@jspmic jspmic commented Jul 28, 2024

  • Added the /help command

Copy link
Owner

@gustavwilliam gustavwilliam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few comment, almost ready.

bot/main.py Outdated
)
embed.add_field(name="`/play`", value="Play the Python Adventures game", inline=False)

embed.add_field(name="", value="\n\n", inline=False)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
embed.add_field(name="", value="\n\n", inline=False)
embed.add_field(name="", value="\n\n", inline=False) # Make space between level fields

Add for all empty fields, to justify why they're there

bot/main.py Outdated
"""Help command."""
embed = discord.Embed(
description="## Available commands",
color=discord.Color.blurple(), # Set the color of the embed
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
color=discord.Color.blurple(), # Set the color of the embed
color=discord.Color.blurple(),

Unnecessary comment

bot/main.py Outdated
Comment on lines 56 to 58
embed.set_thumbnail(url="https://i.imgur.com/e1tfdYP.png")
embed.set_author(name="Python Adventures")
await interaction.response.send_message(embed=embed)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
embed.set_thumbnail(url="https://i.imgur.com/e1tfdYP.png")
embed.set_author(name="Python Adventures")
await interaction.response.send_message(embed=embed)
embed.set_author(name="Python Adventures")
image = File(Path(f"bot/assets/title-art.png", name:="image.png"),
embed.set_thumbnail(url=f"attachment://{name}")
await interaction.response.send_message(embed=embed)

Use local image, so we don't have to rely on Imgur being up for the bot to work.

Something like in the suggestion should work, though you may need to import File and Path. Test run to make sure it actually works, and look at the other parts of the code base that send local images, if it doesn't work and you need inspiration.

@jspmic jspmic closed this Jul 31, 2024
@jspmic jspmic deleted the feature-help_command branch July 31, 2024 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants