Skip to content

Commit 8336705

Browse files
committed
Bump version to 1.11.13 and improve ping command output
Updated the Dockerfile and `BOT_VERSION` constant to reflect the new version `1.11.13`. Enhanced the `ping` command by refactoring the gateway ping calculation for readability and formatting the output values to two decimal places for better precision and clarity.
1 parent d61e1c7 commit 8336705

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

WebhookCreator/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ RUN apk add --no-cache --virtual .build-deps gcc musl-dev python3-dev libc-dev l
2828
LABEL maintainer="Discord: pika.pika.no.mi (970119359840284743)" \
2929
description="Discord bot for managing Webhooks." \
3030
release=$BUILD_DATE \
31-
version="1.11.12" \
31+
version="1.11.13" \
3232
url="https://github.com/Serpensin/DiscordBots-WebhookCreator"
3333

3434
CMD ["python3", "main.py"]

WebhookCreator/main.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
if not os.path.exists(APP_FOLDER_NAME):
3232
os.makedirs(APP_FOLDER_NAME)
3333
ACTIVITY_FILE = os.path.join(APP_FOLDER_NAME, 'activity.json')
34-
BOT_VERSION = "1.11.12"
34+
BOT_VERSION = "1.11.13"
3535
TOKEN = os.getenv('TOKEN')
3636
OWNERID = os.getenv('OWNER_ID')
3737
SUPPORTID = os.getenv('SUPPORT_SERVER')
@@ -634,7 +634,8 @@ async def ping(interaction: discord.Interaction):
634634
before = time.monotonic()
635635
await interaction.followup.send('Pong!')
636636
ping = (time.monotonic() - before) * 1000
637-
await interaction.edit_original_response(content=f'Pong! \nCommand execution time: `{Functions.safe_int(ping)}ms`\nPing to gateway: `{Functions.safe_int(bot.latency * 1000 if interaction.guild is None else bot.shards.get(interaction.guild.shard_id).latency * 1000)}ms`')
637+
gateway_ping = bot.latency * 1000 if interaction.guild is None else bot.shards.get(interaction.guild.shard_id).latency * 1000
638+
await interaction.edit_original_response(content=f'Pong! \nCommand execution time: `{ping:.2f}ms`\nPing to gateway: `{gateway_ping:.2f}ms`')
638639

639640

640641
##Main Commands----------------------------------------

0 commit comments

Comments
 (0)