I’ve been tinkering with making a Discord bot and it was going great. I mean, I made a big booboo and accidentally uploaded the token to github and someone briefly hijacked my bot, but Discord roles prevented any damage.
After that, I changed the token, took off the exposed token from github, and was able to get back to work just fine. That is until, suddenly, I get this error that refused to ever ever go away, even when I commented out basically the entire app (again, mmotivate):
I suspect that the amazon server my application was on was blacklisted by Discord, as that seems to be happening a lot to folks here as of recent. I may need my project moved.
Hello, so I can’t seem to find your project. I found a project called mmotivate but it was from a different person. Either way, what you’re getting right now is a warning.
Not an error, it is saying that you are using a Promise but never handling what would happen if that promise returns back as a failure.
This is a good link with explanation as to how Promises work. Let me know if this was any help at all.
Nah, mmotivate is indeed mine! I just use a different username on here. The user icon is yellow and orange checkerboard, right? That’s me.Sorry about the confusion!
Thing is, I’ve read up that it’s a warning. However, my bot doesn’t come online. At all. I even rewinded to a version which SHOULD have worked fine. Still get a rejection from the API. Bot still doesn’t come online. So it’s not a promise as much as I think discord banned the server my app happens to reside on.
The token should be still good, so if you can go check out the project and see if you can get it to work, be my guest! I’m just super skeptical it’s an issue of promises.
Have you tried moving your code for server.js to testbot.js? or vice versa?
From what I can tell, and I may be wrong, it seems as though the code from server.js is never being run which is never calling the express server.
Also make sure that everything in server.js is not being commented out. And if you move the code from testbot.js to server.js you will need to change package.json to call server.js instead of testbot.js.
Oh! Everything there is just the common Glitch placeholders for a project. It’s not needed AT ALL for my code to work. As for why the bot doesn’t boot on start, I wanted to manually start and stop it just in case I had to do some directory shenanigans.
If the bot loads correctly, it’ll print out some info about the test Discord server I’m on. Just me, the bot, Clyde (placeholder Discord bot, usually invisible), and an additional tester.
Okay so after some testing It seems that the warning was coming from your client.login(token). It was failing and the failure wasn’t being handled in a catch block.
I think the first step to try to fix this might be resetting your token again and updating the token in your .env
So after some back and forth, it DOES seem like it’s a server/Discord blacklist issue. Note I’ve already made a remix of the app I’m having trouble with now, only to have it have the exact same error/issue. I may need admin help.
Ah geez. Even though it’s moved, it still seems like I’m getting the same error, even WITH a catch:
I’m not sure what’s the issue anymore. This is frustrating. Is there any way for me to know EXACTLY what’s going wrong? I tried looking into the Discord error’s error code, but it’s just blank. I’m completely in the dark.