Skip to content

Add bot and verified bot badges to the user embed.#1426

Merged
Akarys42 merged 8 commits into
mainfrom
feat/1365/add-bot-badges-to-user
Apr 25, 2021
Merged

Add bot and verified bot badges to the user embed.#1426
Akarys42 merged 8 commits into
mainfrom
feat/1365/add-bot-badges-to-user

Conversation

@Akarys42
Copy link
Copy Markdown
Contributor

This PR adds a bot tag in the embed title if the user is a bot, and properly handles the verified bot tag.

Here is how it looks with both badges:

image

Closes #1365.

@Akarys42 Akarys42 added p: 2 - normal Normal Priority a: information Related to information commands: (doc, help, information, reddit, site, tags) t: enhancement Changes or improvements to existing features labels Feb 20, 2021
@Akarys42 Akarys42 requested a review from mbaruh as a code owner February 20, 2021 16:04
@coveralls
Copy link
Copy Markdown

coveralls commented Feb 20, 2021

Coverage Status

Coverage increased (+0.004%) to 56.609% when pulling 2ad0317 on feat/1365/add-bot-badges-to-user into 584ed52 on master.

@mbaruh
Copy link
Copy Markdown
Member

mbaruh commented Feb 20, 2021

It's tiny lol, can it be bigger?

@Akarys42
Copy link
Copy Markdown
Contributor Author

Not with an emoji. We could make it a two part emoji, but that's pretty hacky

Comment thread bot/exts/info/information.py Outdated
Comment on lines +231 to +232
if user.bot:
name += f" {constants.Emojis.bot}"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If we truly want to have the bot emoji next to the name, it should be in same style as it is natively in discord, if bot is verified, give it verified emoji, if not, bot emoji. Putting bot emoji next to the name and verified badge below it is just weird.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It has been moved back to the title

@Xithrius Xithrius added the s: waiting for author Waiting for author to address a review or respond to a comment label Mar 6, 2021
Base automatically changed from master to main March 13, 2021 19:40
Utility functions such as hasattr or getattr except __getattribute__ to raise AttributeError not KeyError. This commit also lowers the logging level of the error message to info since it is up to the caller to decide if this is an expected failure or not.
@Akarys42 Akarys42 requested a review from jb3 as a code owner April 17, 2021 16:38
@Akarys42 Akarys42 requested a review from Senjan21 April 17, 2021 16:38
Copy link
Copy Markdown
Member

@ChrisLovering ChrisLovering left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍
image

Comment thread tests/bot/exts/info/test_information.py Outdated
Comment thread tests/bot/exts/info/test_information.py Outdated
Comment thread tests/bot/exts/info/test_information.py Outdated
Co_authored-by: Numerlor <25886452+Numerlor@users.noreply.github.com>
@Akarys42 Akarys42 dismissed Senjan21’s stale review April 25, 2021 14:59

Requested change applied

Copy link
Copy Markdown
Contributor

@ToxicKidz ToxicKidz left a comment

Choose a reason for hiding this comment

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

LGTM, tested and works well. :shipit:

@Akarys42 Akarys42 enabled auto-merge April 25, 2021 15:43
Copy link
Copy Markdown
Contributor Author

@Akarys42 Akarys42 left a comment

Choose a reason for hiding this comment

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

Refresh

@Akarys42 Akarys42 merged commit 387b1c0 into main Apr 25, 2021
@Akarys42 Akarys42 deleted the feat/1365/add-bot-badges-to-user branch April 25, 2021 15:46
@Xithrius Xithrius removed the s: waiting for author Waiting for author to address a review or respond to a comment label May 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: information Related to information commands: (doc, help, information, reddit, site, tags) p: 2 - normal Normal Priority t: enhancement Changes or improvements to existing features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Now that the !user command supports not-in-server members, we might want to add an is-bot field