feelingnothing / dsharpplus.menus Goto Github PK
View Code? Open in Web Editor NEWAn extension to make interactions easier.
An extension to make interactions easier.
Attribute properties must be compile-time constants. Ref types are not compile-time constants. I suggest taking a string instead, and checking if it's an id with ulong.Parse
Just to keep track and not lose something on the way
RULE: Have zero dependencies by official or custom extensions
Support for sharded clients, which is as easy as making an extension method and registering the same thing across all shards
Hey, I am trying to use multiple buttons in the same row. I tried the following:
[StaticPrimaryButton(nameof(OnButtonClick1), "Button 1", row: ButtonPosition.First)]
public async Task OnButtonClick1(ButtonContext ctx)
{
// Stuff
}
[StaticSecondaryButton(nameof(OnButtonClick2), "Button 2", row: ButtonPosition.First)]
public async Task OnButtonClick2(ButtonContext ctx)
{
// Stuff
}
The problem is that this doesn't work. The 2 buttons aren't in the same row.
Is there any specific way to achieve this or is this simply not supported yet?
Mostly for consistency with those that have muscle memory to do something along the lines of ctx.Client
As per the readme, using Row = ButtonPosition.Second
actually ends up putting the button on top.
[SuccessButton("It is a success button")]
public async Task SuccessAsync(ButtonContext ctx) => await Interact(ctx);
[DangerButton("It is a danger button", Row = ButtonPosition.Second)]
public async Task DangerAsync(ButtonContext ctx) => await Interact(ctx);
And the result is this
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.