Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a start_dm option to SimpleMenu #6282

Closed
Flame442 opened this issue Jan 2, 2024 · 5 comments · Fixed by #6286
Closed

Add a start_dm option to SimpleMenu #6282

Flame442 opened this issue Jan 2, 2024 · 5 comments · Fixed by #6286
Assignees
Labels
Category: Core - API - Utils Package This is related to stuff in `redbot.core.utils` Good First Issue Good for beginners to the project. Status: In Progress There's a PR open to deal with this, or an org member is working on this internally Type: Enhancement Something meant to enhance existing Red features.

Comments

@Flame442
Copy link
Member

Flame442 commented Jan 2, 2024

In order to support [p]help with a button menu in DMs, SimpleMenu needs to be able to be sent as a DM to a particular user [Ref]. The current SimpleMenu.start method accepts a Context object, which is incompatible with this behavior. SimpleMenu should be given a new method .start_dm(user: discord.User), which sends the menu as a direct message to that user.

Developer note:
SimpleMenu currently stores self.ctx in .start, however it does not appear to ever be used. The other two attributes set by .start (message and author) will be possible to set in this method.

Unblocks #5375

@Flame442 Flame442 added Type: Enhancement Something meant to enhance existing Red features. Good First Issue Good for beginners to the project. Status: PRs Welcome No one is currently assigned to this issue, but we'd be grateful if anyone made a PR. Category: Core - API - Utils Package This is related to stuff in `redbot.core.utils` labels Jan 2, 2024
@Flame442 Flame442 added this to the 3.5.x milestone Jan 2, 2024
@yeetbruises
Copy link
Contributor

I would like to take on this issue as my first GitHub contribution. I have experience in python discord bots so I think I could solve this.

@Jackenmen
Copy link
Member

Jackenmen commented Jan 13, 2024

@Flame442 any reason we shouldn't consider expanding .start() to allow passing discord.User instead of creating another method? It's mostly just an alternative design but I feel like it may be a bit more aligned with how we generally do these kinds of APIs in Red wherever it makes sense?

@Flame442
Copy link
Member Author

I don't have strong opinions about which option is better, see #5375 (comment) for where I asked Trusty what he thought the best approach was.

@Flame442 Flame442 added Status: In Progress There's a PR open to deal with this, or an org member is working on this internally and removed Status: PRs Welcome No one is currently assigned to this issue, but we'd be grateful if anyone made a PR. labels Jan 13, 2024
@yeetbruises
Copy link
Contributor

Thank you :)

@Flame442
Copy link
Member Author

Flame442 commented Jan 14, 2024

(Context deleted)
If you need help working on the issue, please ask in the #coding channel of the red server (without pinging any particular user).

@Flame442 Flame442 modified the milestones: 3.5.x, 3.5.6 Jan 15, 2024
@Jackenmen Jackenmen removed this from the 3.5.6 milestone Mar 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Core - API - Utils Package This is related to stuff in `redbot.core.utils` Good First Issue Good for beginners to the project. Status: In Progress There's a PR open to deal with this, or an org member is working on this internally Type: Enhancement Something meant to enhance existing Red features.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants