Slash Commands #5139

Closed
opened 2021-06-15 18:40:01 +02:00 by lincolnthedev · 5 comments
lincolnthedev commented 2021-06-15 18:40:01 +02:00 (Migrated from github.com)

Type of feature request

Other

Description of the feature you're suggesting

I found a PIP package for Discord.py slash commands, but I'm not great at Python, so wanted to see if anyone could look into it. Here's some info on it: https://pypi.org/project/discord-py-slash-command/. Also, just want to say thank you for this amazing project!

Anything else?

As for the implementation, probably as a separate cog that comes with core called "slashcmds" and the following commands to go with that cog:

  • [p]addcog Add all of a cog's commands as slash commands
  • [p]addcmd Add a single command as a slash command
  • [p]addcmds Add multiple commands as slash commands
### Type of feature request Other ### Description of the feature you're suggesting I found a PIP package for Discord.py slash commands, but I'm not great at Python, so wanted to see if anyone could look into it. Here's some info on it: [https://pypi.org/project/discord-py-slash-command/](https://pypi.org/project/discord-py-slash-command/). Also, just want to say thank you for this amazing project! ### Anything else? As for the implementation, probably as a separate cog that comes with core called "slashcmds" and the following commands to go with that cog: - **[p]addcog <COG NAME>** Add all of a cog's commands as slash commands - **[p]addcmd <COMMAND NAME>** Add a single command as a slash command - **[p]addcmds <COMMAND NAME...>** Add multiple commands as slash commands
flaree commented 2021-06-15 18:53:12 +02:00 (Migrated from github.com)

We do not support the slash commands feature as our underlying library (discord.py) has yet to add support for them. Once it supports it, we will explore what features within Core will benefit from it, if anything. Cog Authors can either wait for Red to update our d.py version (once it supports it) or use an extension package to implement it in their cogs. The old version of this CC that contained a list of reasons why you shouldn't expect it any time soon can be found by running ?whynoslashold in #testing on the support server https://discord.gg/red

This is taken from our cc in the server.

We do not support the slash commands feature as our underlying library (discord.py) has yet to add support for them. Once it supports it, we will explore what features within Core will benefit from it, if anything. Cog Authors can either wait for Red to update our d.py version (once it supports it) or use an extension package to implement it in their cogs. The old version of this CC that contained a list of reasons why you shouldn't expect it any time soon can be found by running ?whynoslashold in #testing on the support server https://discord.gg/red This is taken from our cc in the server.
lincolnthedev commented 2021-06-15 18:55:55 +02:00 (Migrated from github.com)

This is a library that works on top of Discord.py

This is a library that works on top of Discord.py
flaree commented 2021-06-15 18:58:28 +02:00 (Migrated from github.com)

Until core discord.oy supports it (which won't be until 2.0), it won't be added into core Red. A lot of those libraries badly monkeypatch stuff. Creators are free to use them in their own cogs on the other hand.

Until core discord.oy supports it (which won't be until 2.0), it won't be added into core Red. A lot of those libraries badly monkeypatch stuff. Creators are free to use them in their own cogs on the other hand.
Jackenmen commented 2021-06-15 19:02:43 +02:00 (Migrated from github.com)

As for the implementation, probably as a separate cog that comes with core called "slashcmds" and the following commands to go with that cog:

  • **[p]addcog ** Add all of a cog's commands as slash commands
  • **[p]addcmd ** Add a single command as a slash command
  • **[p]addcmds ** Add multiple commands as slash commands

This is simply not possible, commands created with discord.py's commands extension cannot be directly translated to slash command due to various reasons like the custom converters, greedy parameters, and probably more.

As for the discord-py-slash-command library, we are not interested in using any 3rd-party discord.py libraries for slash commands or buttons. When discord.py supports them, then we'll consider looking into doing something with slash commands (though as said above, it won't be what you suggested) but until then, slash commands are a no-go in Core Red.

> As for the implementation, probably as a separate cog that comes with core called "slashcmds" and the following commands to go with that cog: > > * **[p]addcog ** Add all of a cog's commands as slash commands > * **[p]addcmd ** Add a single command as a slash command > * **[p]addcmds ** Add multiple commands as slash commands This is simply not possible, commands created with discord.py's commands extension cannot be directly translated to slash command due to various reasons like the custom converters, greedy parameters, and probably more. As for the `discord-py-slash-command` library, we are not interested in using any 3rd-party discord.py libraries for slash commands or buttons. When discord.py supports them, then we'll consider looking into doing something with slash commands (though as said above, it won't be what you suggested) but until then, slash commands are a no-go in Core Red.
PixPMusic commented 2022-03-10 20:09:36 +01:00 (Migrated from github.com)
This has been implemented upstream: https://github.com/Rapptz/discord.py/issues/6149 - https://github.com/Rapptz/discord.py/tree/master/discord/app_commands
Sign in to join this conversation.
No labels
Automated PR
Blocked
Blocked By: Damage Control
Blocked By: Dependency
Blocked By: Other PR
Breaking Change
Category: CI
Category: Cogs - Admin
Category: Cogs - Alias
Category: Cogs - Audio
Category: Cogs - Bank
Category: Cogs - Cleanup
Category: Cogs - CustomCommands
Category: Cogs - Dev
Category: Cogs - Downloader
Category: Cogs - Economy
Category: Cogs - Filter
Category: Cogs - General
Category: Cogs - Image
Category: Cogs - Mod
Category: Cogs - Modlog
Category: Cogs - Mutes
Category: Cogs - Permissions
Category: Cogs - Reports
Category: Cogs - Streams
Category: Cogs - Trivia
Category: Cogs - Trivia - Lists
Category: Cogs - Warnings
Category: Core - API - App Commands Package
Category: Core - API - Audio
Category: Core - API - Bank
Category: Core - API - Commands Package
Category: Core - API - Config
Category: Core - API - Other
Category: Core - API - Utils Package
Category: Core - Bot Class
Category: Core - Bot Commands
Category: Core - Command-line Interfaces
Category: Core - Downloader
Category: Core - Help
Category: Core - i18n
Category: Core - Modlog
Category: Core - Other Internals
Category: Core - RPC/ZMQ
Category: Docker
Category: Docs - Changelogs
Category: Docs - For Developers
Category: Docs - Install Guides
Category: Docs - Other
Category: Docs - User Guides
Category: Meta
Category: RPC/ZMQ methods
Category: Vendored Packages
Changelog Entry: Added
Changelog Entry: Pending
Changelog Entry: Skipped
Closed: Duplicate
Closed: External
Closed: Invalid
Closed: User Error
Closed: Won't Fix
Complex Issue
Docs-only
Feature Branch
Good First Issue
Help Wanted
High Priority
Needs Backport To stable-docs
No Activity
No Repro
QA: Bypassed
QA: Changes Requested
QA: Passed
Release Blocker
Status: Accepted
Status: Frozen
Status: In Progress
Status: Needs Discussion
Status: Needs Info
Status: Needs Triage
Status: PRs Welcome
Type: Bug
Type: Dependency Update
Type: Deprecation
Type: Enhancement
Type: Feature
Type: Informational
Type: Merge
Type: Optimisation
Type: Question
Type: Removal
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Mrcoolgamer11/Red-DiscordBot#5139
No description provided.