serenity-rs / poise

Discord bot command framework for serenity, with advanced features like edit tracking and flexible argument parsing
MIT License
597 stars 106 forks source link

Cannot use any parameters in context menu function #256

Closed toast-ts closed 3 months ago

toast-ts commented 3 months ago

Hi, I don't know what the issue is, maybe I am bad at giving the parameter it needs or.. I don't know.. I did double-check the example file and still the same result. image

If I insert any parameter or play around with the "<>" thingy, still says the same error message. Tried restarting rust-analyzer extension and reloading the VSCode window, still nothing.

I assume the examples has gone outdated or my misunderstanding. I am using Rust 1.77 with Poise 0.6.1

kangalio commented 3 months ago

There needs to be an additional parameter beyond the obligatory Context parameter. I admit, the error message is quite ambiguous here

toast-ts commented 3 months ago

Can you please explain more? Also, I did try to test the example echo function but replacing the Context with poise::Context and serenity::Message with poise::serenity_prelude::Message, and this is the result.. image

toast-ts commented 3 months ago

Actually nevermind, I am stupid. It seems to work now.