-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add in hybrid slash commands (#1399)
* feat: add in hybrid slash commands Still relatively untested. Needs a lot of polish. * feat: simulate specific slash restrains * fix: oops, scope is weird * fix: handle no options correctly * feat: add use_slash_command_msg argument * docs: add docs for hybrid command manager * docs: add snippet for hybrid cmds in guide * docs: finialize docs for hybrid commands * fix: properly set x_id properties * docs: adjust title of hybrid command section * fix: handle dummy base command functions * fix: parse subcommands correctly * feat: add silence_autocomplete_errors * fix: make options not keyword-only This threw the prefixed command parser in for a loop. * fix: use more logic to determine right kind of kind * fix: properly handle keyword only * feat: add support for aliases * fix: add aliases to base commands too * refactor: black learns how to not be dumb * feat: remove hybrid command dm app permission handling This wasn't matching slash command behavior --------- Co-authored-by: Astrea49 <25420078+Astrea49@users.noreply.github.com>
- Loading branch information
Showing
10 changed files
with
1,183 additions
and
0 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
docs/src/API Reference/API Reference/ext/hybrid_commands/context.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
::: interactions.ext.hybrid_commands.context |
1 change: 1 addition & 0 deletions
1
docs/src/API Reference/API Reference/ext/hybrid_commands/hybrid_slash.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
::: interactions.ext.hybrid_commands.hybrid_slash |
5 changes: 5 additions & 0 deletions
5
docs/src/API Reference/API Reference/ext/hybrid_commands/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Hybrid Commands Index | ||
|
||
- [Context](context) | ||
- [Hybrid Slash](hybrid_slash) | ||
- [Manager](manager) |
1 change: 1 addition & 0 deletions
1
docs/src/API Reference/API Reference/ext/hybrid_commands/manager.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
::: interactions.ext.hybrid_commands.manager |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from .context import HybridContext | ||
from .hybrid_slash import HybridSlashCommand, hybrid_slash_command, hybrid_slash_subcommand | ||
from .manager import HybridManager, setup | ||
|
||
__all__ = ( | ||
"HybridContext", | ||
"HybridManager", | ||
"HybridSlashCommand", | ||
"hybrid_slash_command", | ||
"hybrid_slash_subcommand", | ||
"setup", | ||
) |
Oops, something went wrong.