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

Improve formatting of ping and uptime commands #1542

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Ken-Miles
Copy link

Description

I changed the uptime command to use a discord formatted timestamp, rather than formatting the start_time and sending it. This way you can see exactly when the bot started, in your own timezone.

In addition, I also added some small formatting to the ping command, so the gateway ping is show in a tiny codeblock like this.

Did you:

Copy link
Contributor

@wookie184 wookie184 left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution.

The change to the uptime command looks fine to me but i'm not sure about the change to the ping command.

The linting is also not passing, if you look at https://github.com/python-discord/sir-lancebot/pull/1542/files you can see the issues, and you can use poetry run task lint locally to lint locally (and poetry run task precommit to set up precommit which will automatically check before you commit).

@@ -20,7 +21,7 @@ async def ping(self, ctx: commands.Context) -> None:
embed = Embed(
title=":ping_pong: Pong!",
colour=Colours.bright_green,
description=f"Gateway Latency: {round(self.bot.latency * 1000)}ms",
description=f"Gateway Latency: `{round(self.bot.latency * 1000)}`ms",
Copy link
Contributor

Choose a reason for hiding this comment

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

image

I think both ways look fine, so I don't really think it's worth changing unless there's a good reason.

Copy link
Author

Choose a reason for hiding this comment

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

Fair enough. I guess it's personal preference but definitely not a necessary change.

@Xithrius Xithrius added area: frontend Related to output and formatting status: needs review Author is waiting for someone to review and approve type: enhancement Changes or improvements to existing features category: utilities Related to utilities labels Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: frontend Related to output and formatting category: utilities Related to utilities status: needs review Author is waiting for someone to review and approve type: enhancement Changes or improvements to existing features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants