Comments (2)
So - taking this issue literally, i disagree with the premise All methods to define application commands should have consistent signatures - same args, same type hinting, same defaults
if we look at the methods to instantiate a app command we have
@slash_command
@subcommand
class SlashCommand
SlashCommand.subcommand
Going one by one;
@slash_command
being the recommended to make a non-sub app command. Its type hints are weird, they should be fixed.@sub_command
as per its docstring, is inteded to be an alternate way to define a slash command, specifically for sub commands. It was also requested. By its very purpose it should NOT have the same signature as@slash_command
SlashCommand.subcommand
is the alternate to@sub_command
- which creates a subcommand from an existing command, as it is creating a command based off of another, there are certain fields it should not have. Again meaning it shouldnt share a signatureclass SlashCommand
being the last suppported way to create a command, isnt really an recommended way to define commands, its designed to act as a model, not a construction vector. By its very purpose, it shouldnt mirror the type hints nor signature of the decors as its use case would be completely different.
I'll admit work could be done to ensure the resultant command object has the same defaults between them, but a blanket all signatures should be the same
is asinine and defeats the purpose of having multiple methods. They are literally not supposed to be the same
If ive missunderstood, please correct me.
from naff.
Closing due to inactivity
from naff.
Related Issues (20)
- Missing docs
- [FEAT] Port Sentry integration from taipan to main library HOT 4
- [FEAT] bot.create_guild()
- [FEAT] Application Command Localization
- [Feat] Support raw strings in Embed.footer HOT 2
- [FEAT] Optional presence/activity cache HOT 2
- [BUG] `Message.reply` fails in DMs + no channel for DMs HOT 1
- [FEAT] Add "delete_after" as (float) param to .send functions.
- [BUG] Caching issue when editing really fast
- [BUG] `GuildVoice.position` is not working as it should HOT 2
- [BUG] Command Syncing HOT 1
- [BUG] bot.is_ready not reset during reconnect
- [FEAT] Add Thread Support for Components HOT 1
- [FEAT] New select menu options
- Bot has exceeded global ratelimit, locking REST API for 0.002 seconds HOT 1
- TypeError: Member.__init__() missing 1 required keyword-only argument: 'joined_at'
- AttributeError: 'NoneType' object has no attribute '_voice_member_ids'
- [FEAT] Modal builder class decorator HOT 1
- [FEAT] Add `Role.clone()` method
- [FEAT] Paginator stuff HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from naff.