Skip to content

Commit

Permalink
Added Slash Commands in README.md and DocString for Slash.help
Browse files Browse the repository at this point in the history
  • Loading branch information
sinsniwal committed Apr 23, 2023
1 parent c920ef6 commit f9e2138
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# iitm-server-bot

This project is a Server Discord bot that handles interactions, messages, reactions, and email sending. It is built using Python and the Discord.py library.
This project is a Server Discord bot that handles interactions, messages, reactions and Slash commands. It is built using Python and the Discord.py library.

## Getting Started

Expand All @@ -20,7 +20,8 @@ The project is structured as follows:
├── cogs
│ ├── Interaction.py
│ ├── Message.py
│ └── Reaction.py
│ ├── Reaction.py
| └── Slash.py
├── config.ini
├── email_template.txt
├── main.py
Expand Down
3 changes: 3 additions & 0 deletions cogs/Slash.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ def __init__(self, client):
@app_commands.command(name='help', description='Displays list of commands and their usage')
@app_commands.describe(command="Input Command Name")
async def help(self, interaction: discord.Interaction, command: str=None):
"""
Displays list of commands and their usage
"""
if command=='help':
output=discord.Embed(title="Help",description="Displays list of commands and their usage",color=0x00ff00)
elif not command:
Expand Down

0 comments on commit f9e2138

Please sign in to comment.