Skip to content

Commit

Permalink
Merge pull request #2 from tarto-dev/add-help-method
Browse files Browse the repository at this point in the history
Add Help method
  • Loading branch information
tarto-dev authored Feb 15, 2024
2 parents edab1ed + 089290e commit 8b884fc
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,29 @@ async def product_cycle(
# Sending the Embed message
await inter.channel.send(embed=embed)

# Slash command to get help information
@bot.slash_command(description="Get help information about the bot")
async def help(inter):
embed = Embed(title="Bot Help")
embed.add_field(
name="/get_products", value="Gets all available products", inline=False
)
embed.add_field(
name="/product_details",
value="Get EoL dates of all cycles of a given product.",
inline=False,
)
embed.add_field(
name="/product_cycle", value="Gets details of a single cycle", inline=False
)
embed.add_field(
name="/help", value="Get help information about the bot", inline=False
)
embed.set_footer(
text="Use /help <command> for more details on a specific command."
)
await inter.channel.send(embed=embed)


# Running the bot with the provided token
if __name__ == "__main__":
Expand Down

0 comments on commit 8b884fc

Please sign in to comment.