Open ahdbarjoud opened 3 years ago
You can use .set_destination(x)
on your menu object and pass in a User, Member, or Context object.
Take a look at this example in the commented code at the bottom for an idea on how to set it up.
I'm going to close this as it is getting old.
If this wasn't what you needed, you can reopen and I'll help you get it going! :)
Don't I have to create a PaginatedMenu instance and pass ctx to it?
You can use it on any of the menu types.
Generally though, it's going to look like this:
menu = PaginatedMenu(ctx)
menu.set_destination(ctx.author) # this would DM the user, and the menu would be interacted from within that
By default, set_destination uses the context.channel.
Yes but I'm using this in on_raw_reaction_add so I don't get the context to add. I know I can create context by fetching the message from payload.message_id, but I'm having this as a last resort as I want to make as less requests as possible.
I'm not sure if this is possible already, but it would be nice if I can send menus in DMs without cluttering DMs.
I have an on_raw_reaction event where if a certain reaction is made, I want to send a menu to the user's DM but the menu only accepts Context.