question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Banned after one DM (401 Unauthorized)

See original GitHub issue

Bot joins server fine but as soon as DM text spam is launched bot gets banned after just one successful message. The message is randomized and is single line and contains no emojis.

Steps to reproduce the behavior:

  1. Configure tokens.txt with one token
  2. Launch join server (works)
  3. Launch DM Text Spam
  • OS: OSX
  • Python 3.7
Started Text DM Spam
80xxxxxxxxx546
 [+] (<discum.messages.messages.Messages->createDM) Post -> https://discord.com/api/v8/users/@me/channels

 [+] (<discum.messages.messages.Messages->createDM) {'recipients': ['80xxxxxxxxx546']}

 [+] (<discum.messages.messages.Messages->createDM) Response <- {"message": "Cannot send messages to this user", "code": 50007}

Something went wrong (;3;) relaunching...
161xxxxxxxxxxxx09
 [+] (<discum.messages.messages.Messages->createDM) Post -> https://discord.com/api/v8/users/@me/channels

 [+] (<discum.messages.messages.Messages->createDM) {'recipients': ['161xxxxxxxxxxxx09']}

 [+] (<discum.messages.messages.Messages->createDM) Response <- {"id": "83xxxxxxxxxxx33", "type": 1, "last_message_id": null, "recipients": [{"id": "161859548540305409", "username": "xxxxxx", "avatar": "aeaxxxxxxxxxxxxxxxc12e", "discriminator": "3780", "public_flags": 0}]}

 [+] (<discum.messages.messages.Messages->sendMessage) Post -> https://discord.com/api/v8/channels/83xxxxxxxxxxx33/messages

 [+] (<discum.messages.messages.Messages->sendMessage) {'content': '<3<3 Hello this is a test <3 ~<3~^_ ^', 'tts': False, 'nonce': '830xxxxxxxxxx000'}

 [+] (<discum.messages.messages.Messages->sendMessage) Response <- {"id": "830xxxxxxxxx1504", "type": 0, "content": "<3<3 Hello this is a test <3 ~<3~^_ ^", "channel_id": "83xxxxxxxxx9233", "author": {"id": "805918878466965546", "username": "xxxxxxxx", "avatar": "aaf8xxxxxxxxxxxx7015", "discriminator": "5418", "public_flags": 0}, "attachments": [], "embeds": [], "mentions": [], "mention_roles": [], "pinned": false, "mention_everyone": false, "tts": false, "timestamp": "2021-04-11T05:37:58.715000+00:00", "edited_timestamp": null, "flags": 0, "nonce": "830xxxxxxxxx8000", "referenced_message": null}

Sent message to 1618xxxxxxxxxx409
Complete!
30xxxxxxxxxx11947
 [+] (<discum.messages.messages.Messages->createDM) Post -> https://discord.com/api/v8/users/@me/channels

 [+] (<discum.messages.messages.Messages->createDM) {'recipients': ['300xxxxxxxxx47']}

 [+] (<discum.messages.messages.Messages->createDM) Response <- {"message": "401: Unauthorized", "code": 0}

Something went wrong (;3;) relaunching...

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:4
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
lowlypalacecommented, Apr 22, 2021

Any updates on this one? I also sent you a Twitter DM with some bugs I found @Merubokkusu

0reactions
ghostcommented, May 23, 2021

Okay guys, i’ve found a workaround. Sadly, it’s not avaible for python. You can use node.js. Libraries such as discord.js combined with puppeteer for auto-joining server and auto-account creator, and discord.js for spamming the channels will work great.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Discord API 401: Unauthorized error - Stack Overflow
I'm sending my authorization token in headers but it's still returning error 401. My code: headers = { 'authorization': AUTH_TOKEN } params ...
Read more >
How to Report A Problem To Discord
If it happened in a Direct Message or contacting the moderators doesn't help, fill out the Report Form. Please make sure to fill...
Read more >
Analysis of Streamcord's outage on February 24th | by Akira
Whenever it tried to send a request to Discord, the bot received a response just like this one: {"message": "401: Unauthorized","code": 0}.
Read more >
Heng Ban - Swanson School of Engineering
Heng Ban. Professor. Richard K. Mellon Professor & Associate Dean for Strategic ... Turer, D.M., Good, C.H., Schilling, B.K., Turer, R.W., Karlowsky, N.R., ......
Read more >
Client-Server API - Matrix Specification
For example, if the client receives an error code of M_NOT_FOUND but the ... The homeserver returns an HTTP 401 response, with a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found