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

crashing after message deletion #10313

Closed
Daijobou opened this issue Jun 2, 2024 · 5 comments
Closed

crashing after message deletion #10313

Daijobou opened this issue Jun 2, 2024 · 5 comments
Labels

Comments

@Daijobou
Copy link

Daijobou commented Jun 2, 2024

Which package is this bug report for?

discord.js

Issue description

  • Type/Submit !testdelete
  • Message is successfully deleted
  • Bot crash after deletion with:

at module.exports [as MESSAGE_DELETE] (/home/mybot/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_DELETE.js:4:32) at WebSocketManager.handlePacket (/home/mybot/node_modules/discord.js/src/client/websocket/WebSocketManager.js:355:31) at WebSocketManager. (/home/mybot/node_modules/discord.js/src/client/websocket/WebSocketManager.js:239:12) at WebSocketManager.emit (/home/mybot/node_modules@vladfrangu/async_event_emitter/dist/index.cjs:282:31) at WebSocketShard. (/home/mybot/node_modules@discordjs/ws/dist/index.js:1190:51) at WebSocketShard.emit (/home/mybot/node_modules@vladfrangu/async_event_emitter/dist/index.cjs:282:31) at WebSocketShard.onMessage (/home/mybot/node_modules@discordjs/ws/dist/index.js:1005:14)

Code sample

client.on('messageCreate', message => {
    if (message.content === '!testdelete')
    {
        message.delete().then(() => {
        });
    }
});

Versions

[email protected]
Node.js v21.7.3.
AlmaLinux 8.10

Issue priority

Medium (should be fixed soon)

Which partials do you have configured?

No Partials

Which gateway intents are you subscribing to?

Guilds, GuildMembers, GuildMessages, MessageContent

I have tested this issue on a development release

No response

@Jiralite
Copy link
Member

Jiralite commented Jun 2, 2024

Can you provide the error message (and never omit it)?

@Daijobou
Copy link
Author

Daijobou commented Jun 2, 2024

I don't understand, the error message is already in "Issue description".

@Jiralite
Copy link
Member

Jiralite commented Jun 2, 2024

That is not an error message. That is the stack trace. The error message will be above the stack trace and is a crucial piece of information.

@Daijobou
Copy link
Author

Daijobou commented Jun 2, 2024

Oh there was more. I didn't know that, because I used "journalctl -u mybot -f" but must use "journalctl -u mybot -f -n 100" for much more lines. Thanks, this hint helped me a lot! I close this issue, because now I found the reason. Thanks!

@Daijobou Daijobou closed this as completed Jun 2, 2024
@Jiralite
Copy link
Member

Jiralite commented Jun 2, 2024

In the future, it would be wise to share what was wrong in case people stumble across the same issue.

@Jiralite Jiralite closed this as not planned Won't fix, can't repro, duplicate, stale Jun 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants