Skip to content

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

@Rishiraj0100

Description

@Rishiraj0100

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: tagsRelated to the @Python bot's tags

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions