API returns 400 instead of 403 when a bot DMs a user who blocked it

(#370) Bug Closed: Fixed api dms

Summary

When I attempt to send a DM to a user who has DMs turned off (or blocked the bot), I get a 400 BadRequest error rather than the expected 403 Forbidden error.

Steps to reproduce

  1. Create a bot.
  2. Block your bot.
  3. Make your bot send a DM to you.
  4. Watch as you get an Error 400 BadRequest instead of an Error 403 Forbidden.

Logs or screenshots (optional)

image

3 comments

Sign in with Fluxer to comment and vote.
Comment by Rex
RexSystem 1 vote edited
Status changed from Fixed to Awaiting confirmation
This may be fixed in the current version. If it still happens for you, please say so here.
Comment by Rex
RexSystem 1 vote
Status changed from Awaiting confirmation to Fixed
Imported from GitHub, fix shipped. Closed in bulk.
Comment by @mads-fs
RexSystem 1 vote originally by @mads-fs on GitHub
I made changes in a fork of fluxer, but I can't make a pull request to this repo :/