mirror of
https://github.com/xHyroM/bun-discord-bot.git
synced 2024-12-22 12:11:06 +01:00
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 <yorunoken@skiff.com>
This commit is contained in:
parent
d4843ecbee
commit
89a7c5922f
1 changed files with 2 additions and 2 deletions
|
@ -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\``,
|
||||
});
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue