Skip to content

[Feature Request] Retrieve user for the first user arg from the message reference #375

@segvyfault

Description

@segvyfault

Currently, if command function defined like this:

fn command(user1: User, user2: User)

Poise will only call this function if you do this:

!command @user1 @user2

But I want it to also accept this type of ping:

- replying to @user1 (with mentioning on !!, otherwise it should be ignored)
!command @user2

I tried forking and trying to implement it on my own, but the code of prefix argument parsing is too complex and non-flexible, so I'll leave it for you, the maintainers.
I did implement that before in just serenity, and instead of parsing userids from the message content, I used message.mentioned_users or whatever its called. If the mention on referenced message was enabled, first user will always be the author of the replied message

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions