Comments (3)
The reason this was not the api for sending message components in the first place is because the view makes it easier for the developer. I don't find that it isn't convenient to use as well, adding a components kw/arg would serve to confuse, it is better to simply have 1 concrete way of doing something. Also this doesn't look very "convenient" to use
await something.send('Hello, world!', components=[
ActionRow(
Button(...)
)
])
The discord.ui.button
decorator makes it very easy to add buttons to a view. (For selects you should probably subclass because it looks ugly otherwise).
In my opinion, the view api is simpler to as you don't have to worry about the boring code that happens behind the scenes.
(Also if you really want to have a components arg you could check out this)
Lines 413 to 457 in 8aa1e90
from pycord.
On top of that, the interaction response is handled in the view.
Make a factory for yourself, that's what I'm doing.
from pycord.
The reason this was not the api for sending message components in the first place is because the view makes it easier for the developer. I don't find that it isn't convenient to use as well, adding a components kw/arg would serve to confuse, it is better to simply have 1 concrete way of doing something. Also this doesn't look very "convenient" to use
await something.send('Hello, world!', components=[ ActionRow( Button(...) ) ])The
discord.ui.button
decorator makes it very easy to add buttons to a view. (For selects you should probably subclass because it looks ugly otherwise).In my opinion, the view api is simpler to as you don't have to worry about the boring code that happens behind the scenes.
(Also if you really want to have a components arg you could check out this)
Lines 413 to 457 in 8aa1e90
I agree with this and will close this issue.
from pycord.
Related Issues (20)
- Wrong Typehinting in ext/bridge/core.py HOT 1
- Voice Channel Status - Audit Logs HOT 1
- 'Bot' object has no attribute 'logout' HOT 2
- bridge.Context not a valid context typehint
- [voice] broken audio playback in stage channels HOT 1
- Paginator author check HOT 5
- No easy way to store and restore UI/Component state
- Bridge Command Arg HOT 1
- BridgeOption converts discord.Member wrong with ext command
- Unclosed client session, Unclosed connector HOT 2
- deprecate and replace with interaction_metadata HOT 5
- authorizing_integration_owners HOT 1
- Temporary disable slash_command in py-cord HOT 4
- Guild.search_members bug
- AttributeError: 'FFmpegPCMAudio' object has no attribute '_process' HOT 1
- Interaction Error on Shard Reconnection HOT 4
- Constant Shard Reconnection and ConnectionClosed Errors with AutoShardedBot HOT 1
- string returned for slash commands when using `Option/input_type` HOT 1
- Subcommand groups not showing up in the Slash Command channel HOT 4
- Slash commands interaction response doesnt give message HOT 1
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 pycord.