A discord.py slash commands extension
Project description
slash-ext
Yet another slash command lib made for discord.py, except this one intergrates will intergrate with discord.ext, thus making it a lot easier to use. Some resources are provided too, such as the INTERACTION_CREATE socket response. This is provided in the debug.json file. I do not mind sharing this token as its invalid.
Example:
import discord
from discord.ext import commands, slash
from discord.ext.slash.abc import SlashContext
bot = commands.Bot(command_prefix = "!", case_insensitive = True)
slashParent = slash.SlashBot(bot, "<bot token>", 770301542170361896) #<= Bot User ID
@bot.event
async def on_ready():
print("Ready!")
@slashParent.slash_command(name = "rachel", description = "hola", guild_ids=[830418497837203457]) #make sure to not have names with spaces in them as discord will not create them.
async def dummy(ctx : SlashContext):
embeds = [discord.Embed(title = "Hello World")]
await ctx.send(content = "Hello World", embeds = embeds)
await ctx.edit(content = "Hello Discord")
@bot.event
async def on_slash_recieve(payload): #=> event that is fired when a slash command is fired and it is found in the bot's cache
print("RECEIEVED SLASH")
print(payload)
bot.run("<bot token>")
We give you the option to pass in the bot token and bot user id because you cannot access the token and id before the bot is ready.
If you have any questions, please DM me on Discord: moonie#6598
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dpy-slash-ext-0.0.1a0.tar.gz.
File metadata
- Download URL: dpy-slash-ext-0.0.1a0.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d032de6389dc28a4aa3ff6fb0333bb4c3ca26f489ada05dca6a54632d92a833
|
|
| MD5 |
55ab168ac3c6851997bc3d1b736be5e3
|
|
| BLAKE2b-256 |
6c5157468503d4da87dc19a8b7cd2f675d32e5c4810a81c59c38b84f6a0c2cde
|
File details
Details for the file dpy_slash_ext-0.0.1a0-py3-none-any.whl.
File metadata
- Download URL: dpy_slash_ext-0.0.1a0-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
268bc596d4fe2e39e3d565e846f36ec40db3de666b3e51538ee1e01ff7c06586
|
|
| MD5 |
ee053a73c4ae08d1de5f6ab8f81cb1e4
|
|
| BLAKE2b-256 |
0da23f86f74a78971b64868ef9248172e11f5e642cdb0123698593cf165b6d39
|