Skip to content

Guides · Discord bots

Protect your bot token

Never in code, use .env, Reset at once if it leaks.

The token is the bot's password. Anyone who has it can send messages as the bot and damage your Discord server.

1. Keep it out of code

LanguageRead .env
Pythonfrom dotenv import load_dotenv; load_dotenv() → os.getenv("TOKEN")
Node.jsrequire("dotenv").config() → process.env.TOKEN

Keep .env only in panel Files.

2. Keep it off GitHub

Create .gitignore at the repository root:

.env
node_modules/
__pycache__/
venv/

If already uploaded, deleting it leaves it in history. Reset it immediately using step 3.

3. If leaked (immediately)

  1. Developer Portal → your app → Bot → Reset Token.
  2. Save the new token in .env → panel Restart.
  3. The old token stops working immediately.

Discord may detect and reset tokens in public repositories. If login suddenly fails, get a new token.

4. Do not share

  • Hide tokens in code and screenshots when asking questions.
  • Do not hand over a token to someone offering to fix your bot.
  • Do not include tokens in SJNoDE support requests.

5. Panel account

The panel uses your store password. Use a password you do not use on other sites.

All guides Discord bot plans Contact support

Partner 봇 제작 외주 이어드림 커스텀 봇 · 컴포넌트 V2 · 웹 · 프로그램 · 로고 · 배너 · UI/UX Ask on Discord