Search code examples
discord.js.envbun

bun .env file dont change


I am writing a discord bot with this. I changed the token value in my .env file, but it still has the same value. The new value is not updated.

DISCORD_BOT_TOKEN="value1" -> old

DISCORD_BOT_TOKEN="value2" -> new .env file

client.login(Bun.env.DISCORD_BOT_TOKEN);

use this

package.json

"scripts": 
   { 
     "run": "bun run src/index.ts", 
     "dev": "bun --watch src/index.ts" 
   },
bun run dev 

my code dont update value2 always use value1 macos m1

bun run env

As I write this, the value 1 is written in DISCORD_BOT_TOKEN. How to delete it and update it?


Solution

  • I solved it this way

    unset DISCORD_BOT_TOKEN
    

    deleted DISCORD_BOT_TOKEN