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

Check if subscriber is DMable before subscribing #173

Open
pianiststickman opened this issue Apr 13, 2020 · 1 comment
Open

Check if subscriber is DMable before subscribing #173

pianiststickman opened this issue Apr 13, 2020 · 1 comment

Comments

@pianiststickman
Copy link
Contributor

Looks like the subscribe feature is failing to DM some users. Might lead to some subscribers wondering where their pings are.

0|app  | DiscordAPIError: Cannot send messages to this user
0|app  |     at /home/pinano/pinano/node_modules/discord.js/src/client/rest/RequestHandlers/Sequential.js:85:15
0|app  |     at /home/pinano/pinano/node_modules/snekfetch/src/index.js:215:21
0|app  |     at runMicrotasks (<anonymous>)
0|app  |     at processTicksAndRejections (internal/process/task_queues.js:94:5) {
0|app  |   name: 'DiscordAPIError',
0|app  |   message: 'Cannot send messages to this user',
0|app  |   path: '/api/v7/channels/540922047182798848/messages',
0|app  |   code: 50007,
0|app  |   method: 'POST'
0|app  | }
@pianiststickman
Copy link
Contributor Author

Quick triage comment: the only thing this really causes is some (intentionally) missed DMs and a few spurious log messages. There's marginal benefit in warning the user upon subscription that we can't DM them, but only marginal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant