python-discord / meta

Issue tracker for suggestions and other questions relating to our community
https://pythondiscord.com
31 stars 5 forks source link

Add `slash commands in d.py v2.0` tag #159

Closed Rishiraj0100 closed 2 years ago

Rishiraj0100 commented 2 years ago

Tag Name

slash-cmds-in-d.py-v2.0

What kind of content should the tag include?

How to create / command in d.pyv2.0a

To create a Bot for / commands and context-menus in python there's a library named dpy-appcommands

Install it by

python3 -m pip install dpy-appcommands -U

A / cmd

import appcommands
#making a bot
bot = appcommands.Bot(command_prefix="$")
# / cmd
@bot.slashcommand()
async def hi(ctx):
    await ctx.send("hello", ephemeral=True)

For full docs click here

bsoyka commented 2 years ago

Thanks for the suggestion! Have users (especially in help channels) expressed a desire for a tag like this?

Also, as @Akarys42 mentioned in python-discord/bot#1970, we probably don't want to show support for any discord.py library right now.

Akarys42 commented 2 years ago

Hey @Rishiraj0100, thanks for the issue.

As said in python-discord/bot#1970, we don't want to tell our users to use X library as a discord.py extension right now. We don't know what each library is worth, we prefer to have helpers suggest whichever they think is the best. Because of that, I'm going to close this suggestion.