Skip to content
This repository was archived by the owner on Dec 30, 2022. It is now read-only.

Commit 7cf258a

Browse files
authored
Merge pull request #1 from Rishiraj0100/alpha
v2.0
2 parents 3d882e0 + fd1ae84 commit 7cf258a

37 files changed

+5106
-1423
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
# dpy-appcommands
22
[![PyPi](https://shields.io/pypi/v/dpy-appcommands.svg)](https://pypi.org/project/dpy-appcommands/)
33
[![PyPi](https://shields.io/pypi/pyversions/dpy-appcommands.svg)](https://pypi.org/project/dpy-appcommands/)
4-
## Installation and Usage
4+
## Support
5+
If you want any support then join my [`discord server`](https://discord.gg/zdrSUu98BP)
6+
## Installation
57

68
To install this module, run
79

810
```bash
911
pip install -U dpy-appcommands
1012
```
1113

12-
### Usage
14+
## Usage
1315

1416
For a headstart, here's an example
1517
but if you want to view full
@@ -24,31 +26,29 @@ bot = appcommands.Bot(command_prefix=commands.when_mentioned_or('?'))
2426
class Blep(SlashCommand):
2527
def __init__(self):
2628
super().__init__(
27-
bot.appclient,
2829
name="blep",
2930
description = "Some blep description",
30-
callback = self.callback
3131
)
3232

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

3636
# or
3737

38-
@bot.slash(name="test", description="test")
38+
@bot.slashcommand(name="test", description="test")
3939
async def test(ctx):
40-
await ctx.reply("tested")
40+
await ctx.senx("tested")
4141

4242
# or
4343

44-
@bot.appclient.command(name="test2", description="test")
44+
@bot.slashcommand(name="test2", description="test")
4545
async def test(ctx):
46-
await ctx.reply(f"tested {ctx.author}")
46+
await ctx.respond(f"tested {ctx.author}")
4747

4848
@bot.event
4949
async def on_ready():
5050
print(f'Logged on as {bot.user} (ID: {bot.user.id})')
51-
await bot.appclient.add_command(Blep())
51+
await bot.add_slash_command(Blep())
5252

5353
bot.run("TOKEN")
5454
```

appcommands/__init__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
__author__ = "Rishiraj0100"
2-
__version__ = "1.0.0"
2+
__version__ = "2.0.0"
33
import discord
44

55
if not discord.__version__.startswith("2.0"):
66
raise RuntimeError(f"This module requires dpy v2.0 not {discord.__version__}")
77

8-
from .client import *
9-
from .models import *
8+
from .cog import *
9+
from .core import *
1010
from .enums import *
11+
from .client import *
1112

0 commit comments

Comments
 (0)