Git Product home page Git Product logo

dsharpplus.menus's People

Contributors

feelingnothing avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

dsharpplus.menus's Issues

Ref type in ButtonAttribute

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

TODOs

Just to keep track and not lose something on the way
RULE: Have zero dependencies by official or custom extensions

  • Select menus implementation (*must-have)
  • Link button implementation
  • Give user constructor parameter to choose timeout for single menu
  • A way to ack to menus created in this extension if they are deleted without touching others [Maybe some const prefix]
  • Way to edit the way a button are lined up in the row, let the user change this, maybe add position enum from 0 to 5

ShardedClient support

Support for sharded clients, which is as easy as making an extension method and registering the same thing across all shards

Multiple buttons in the same row

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?

ButtonPosition is not respected

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.