From 89a7c5922f8938c014b4cfb9dd586a211f99451d Mon Sep 17 00:00:00 2001 From: Yoru Date: Sat, 30 Dec 2023 23:04:40 +0300 Subject: [PATCH] Edit the message the bot sends in `ping.ts` (#33) In `message-commands/ping.ts`, the code attempts to edit the message the author sent, resulting in an error on line 12. This pr fixes that bug Co-authored-by: YoruNoKen --- src/message-commands/ping.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/message-commands/ping.ts b/src/message-commands/ping.ts index e43bc80..1cafb5a 100644 --- a/src/message-commands/ping.ts +++ b/src/message-commands/ping.ts @@ -3,13 +3,13 @@ import { MessageCommand } from "@lilybird/handlers"; export default { name: "ping", run: async (message) => { - await message.reply({ + const newMessage = await message.reply({ content: "🏓...", }); const { ws, rest } = await message.client.ping(); - await message.edit({ + await newMessage.edit({ content: `🏓 WebSocket: \`${ws}ms\` | Rest: \`${rest}ms\``, }); },