Ask coding questions

← Back to all posts
HEY I HAVE BEEN HACKED ON MY BOTS
Mrcoolcool

I was in discord and my friend left the server and he has a own bot. So I shutdown the bot. After some day it was online i didn’t care. Some time later it was online again and I checked on repl.it if it was online but it was not. And I remembered the repls are public and I kicked the bots but I have forget one group I had them in and after some day it happened. THE HOLE GROUP WAS DESTROYED IT STAND “xlie was here” EVERYWHERE And I contacted he and he said he haven’t do something.....

Voters
Mrcoolcool
Comments
hotnewtop
UnluckyFroggy

Hello, I would love to help, did you put your token on your repl? if so, generate a new token in the Discord Developer Portal in the bot tab, copy the token and go back to repl. Go to your console and type: npm i dotenv, once it's done downloading, create a new file called .env, go into the file and put in: TOKEN='YOUR_TOKEN' then go back to your main file and put in at the top: const TOKEN = process.env.TOKEN; then, to login the bot with your token add: client.login(process.env.TOKEN); or replace client with whatever variable you use as your bot.

RYANTADIPARTHI

probably a token problem. Do you have it? can we see some info?

Mrcoolcool

i know what the problem was i did put the discord token in the code but every single video i found they said make a .env file but it didnt work because i named it token.env. but now i know how to do it but it was also my first discord bot i made but its still bad that he nuked my group.

CodingCactus

it's because the file must be called only .env, NOT Token.env as is here

That is also the incorrect way to store your token btw, remove the brackets and the quites so that it is just DISCORD_BOT_SECRET= ODAzODY2NTYyOTM1MTI4MDc1.YBEBEw.mTBDg9s_TKsmJRABWQQV8kMt2fc

And now of course regenerate your token in the discord developer portal.

19wintersp

Did you write your Discord token into your code?