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
68To install this module, run
79
810``` bash
911pip install -U dpy-appcommands
1012```
1113
12- ### Usage
14+ ## Usage
1315
1416For a headstart, here's an example
1517but if you want to view full
@@ -24,31 +26,29 @@ bot = appcommands.Bot(command_prefix=commands.when_mentioned_or('?'))
2426class 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" )
3939async 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" )
4545async def test (ctx ):
46- await ctx.reply (f " tested { ctx.author} " )
46+ await ctx.respond (f " tested { ctx.author} " )
4747
4848@bot.event
4949async 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
5353bot.run(" TOKEN" )
5454```
0 commit comments