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

Unable to respond to DMs #76

Closed
MarcTowler opened this issue Feb 10, 2019 · 2 comments
Closed

Unable to respond to DMs #76

MarcTowler opened this issue Feb 10, 2019 · 2 comments

Comments

@MarcTowler
Copy link

Similar issue to #64 where I am getting the following error when a user responds to a DM sent by the bot:

Uncaught Promise Error: TypeError: Cannot read property 'me' of undefined at module.exports.run (C:\Users\MarcT\WebstormProjects\Discord-Bot\events\message.js:17:55) at Bot.client.on.args (C:\Users\MarcT\WebstormProjects\Discord-Bot\index.js:191:45) at Bot.emit (events.js:159:13) at MessageCreateHandler.handle (C:\Users\MarcT\WebstormProjects\Discord-Bot\node_modules\discord.js\src\client\websocket\ packets\handlers\MessageCreate.js:9:34) at WebSocketPacketManager.handle (C:\Users\MarcT\WebstormProjects\Discord-Bot\node_modules\discord.js\src\client\websocke t\packets\WebSocketPacketManager.js:103:65) at WebSocketConnection.onPacket (C:\Users\MarcT\WebstormProjects\Discord-Bot\node_modules\discord.js\src\client\websocket \WebSocketConnection.js:333:35) at WebSocketConnection.onMessage (C:\Users\MarcT\WebstormProjects\Discord-Bot\node_modules\discord.js\src\client\websocke t\WebSocketConnection.js:296:17) at WebSocket.onMessage (C:\Users\MarcT\WebstormProjects\Discord-Bot\node_modules\ws\lib\event-target.js:120:16) at WebSocket.emit (events.js:159:13) at Receiver._receiver.onmessage (C:\Users\MarcT\WebstormProjects\Discord-Bot\node_modules\ws\lib\websocket.js:137:47)

Which refers to the following:
// Cancel any attempt to execute commands if the bot cannot respond to the user. if (!message.channel.permissionsFor(message.guild.me).missing("SEND_MESSAGES")) return;
If I step pass this by commenting it out, the bot is then left in a state where it is unable to respond to the user, leaving no error behind either.

@AndrewJWin
Copy link
Contributor

This is likely fixed by PR #64, however until the PR is fully reviewed and accepted. This issue may persist.

@AndrewJWin
Copy link
Contributor

@YorkAARGH This Issue has been left since 2/12/19, the PR request that was to fix the issue has been closed. I suggest closing the issue.

@kyranet kyranet closed this as completed Apr 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants