Metadata-Version: 2.1
Name: dpy-appcommands
Version: 2.0.1
Summary: A module for creating and using application commands on discord.
Home-page: UNKNOWN
Author: Rishiraj0100
License: MIT
Project-URL: Documentation, https://dpy-appcommands.rtfd.io/
Project-URL: Issue tracker, https://github.com/Rishiraj0100/dpy-appcommands/issues
Platform: UNKNOWN
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE

# dpy-appcommands
[![PyPi](https://shields.io/pypi/v/dpy-appcommands.svg)](https://pypi.org/project/dpy-appcommands/)
[![PyPi](https://shields.io/pypi/pyversions/dpy-appcommands.svg)](https://pypi.org/project/dpy-appcommands/)
## Support
If you want any support then join my [`discord server`](https://discord.gg/zdrSUu98BP)
## Installation

To install this module, run

```bash
pip install -U dpy-appcommands
```

## Usage

For a headstart, here's an example
but if you want to view full
documentation on it then [`click here`](https://dpy-appcommands.rtfd.io)

```py
import appcommands
from discord.ext import commands

bot = appcommands.Bot(command_prefix=commands.when_mentioned_or('?'))

class Blep(SlashCommand):
    def __init__(self):
        super().__init__(
            name="blep",
            description = "Some blep description",
        )

    async def callback(self, ctx: InteractionContext, pleb: str = None):
        await ctx.reply(f"why {pleb}", ephemeral=True)

# or

@bot.slashcommand(name="test", description="test")
async def test(ctx):
    await ctx.send("tested")

# or

@bot.slashcommand(name="test2", description="test")
async def test(ctx):
    await ctx.respond(f"tested {ctx.author}")

@bot.event
async def on_ready():
    print(f'Logged on as {bot.user} (ID: {bot.user.id})')
    await bot.add_app_command(Blep())

bot.run("TOKEN")
```

### Screenshots

![image](https://user-images.githubusercontent.com/75272148/127775083-6722865b-b38a-4c1c-aeab-67792448224b.png)

![image](https://user-images.githubusercontent.com/75272148/127775088-8504cd9d-0b94-4e82-a683-e8acb6cc0f43.png)

![image](https://user-images.githubusercontent.com/75272148/127775094-75c435c7-6600-4a43-9433-80482692821f.png)


