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

Support new Discord username #1397

Merged
merged 5 commits into from
Mar 3, 2024
Merged

Support new Discord username #1397

merged 5 commits into from
Mar 3, 2024

Conversation

MagicTeaMC
Copy link
Contributor

@MagicTeaMC MagicTeaMC commented Jun 28, 2023

This pull request...

  • Fixes a bug
  • Introduces a new feature
  • Improves an existing feature
  • Boosts code quality or performance

Description

A easy way to support Discord new username(maybe

Purpose

圖片
圖片

@MagicTeaMC MagicTeaMC changed the title Support new username Support new Discord username Nov 3, 2023
@jagrosh
Copy link
Owner

jagrosh commented Feb 28, 2024

I don't like how this is implemented; I think we should add a formatting function somewhere that will handle the logic, and then use the formatted output anywhere we need the username

@MagicTeaMC
Copy link
Contributor Author

discord will force all user to use new username, so we don't need to check username anymore :)

@jagrosh
Copy link
Owner

jagrosh commented Feb 29, 2024

Either way I think it would still be good to make a specific formatting function for usernames. Discrims will still exist for a bit longer (this would be a future-proof solution) and then it becomes easier to make other formatting changes in the future (for example, showing display name instead of username, or showing a combination of them).

MagicTeaMC added a commit to MagicTeaMC/Orange-Dog that referenced this pull request Mar 1, 2024
@MichailiK MichailiK self-requested a review March 1, 2024 12:07
Copy link
Collaborator

@MichailiK MichailiK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new formatUsername utility is missing usage in 2 places:

+"** "+(rm.getOwner() == 0L ? "(autoplay)" : "(requested by **" + rm.user.username + "**)"));

+ "** " + (rm.getOwner() == 0L ? "(autoplay)" : "(requested by **" + rm.user.username + "**)");

@MichailiK MichailiK requested a review from jagrosh March 2, 2024 09:08
@jagrosh jagrosh merged commit 1ad1618 into jagrosh:master Mar 3, 2024
3 checks passed
ElerWohlmuthFH pushed a commit to ElerWohlmuthFH/MusicBot that referenced this pull request Sep 20, 2024
* Support new username

* Support new username, again

* Make a separate username formatting function

* Add some missing usage

* switch away from using static imports, add shortcuts for jda User and metadata UserInfo, add null check

---------

Co-authored-by: unknown <john.a.grosh@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants