diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..fc56a69 --- /dev/null +++ b/.env.example @@ -0,0 +1,12 @@ +# FIREBASE +# cert data to string +FIREBASE_CERT = "JSON.stringify(the_file)" + + +# DISCORD +# discord bot token +DISCORD_TOKEN = "" +# discord application client id +DISCORD_CLIENT_ID = "" +# guild id for deploy +DISCORD_TARGRT_GUILD_ID = "" \ No newline at end of file diff --git a/src/deploy.ts b/src/deploy.ts index 3ab2c36..1727c32 100755 --- a/src/deploy.ts +++ b/src/deploy.ts @@ -18,8 +18,8 @@ const rest = new REST({ version: "10" }).setToken( // The put method is used to fully refresh all commands in the guild with the current set await rest.put( Routes.applicationGuildCommands( - process.env.discord_CLIENT_ID as string, - process.env.discord_GUILD_ID as string + process.env.DISCORD_CLIENT_ID as string, + process.env.DISCORD_TARGET_GUILD_ID as string ), { body: commands } ); diff --git a/src/wrapper/firebase.ts b/src/wrapper/firebase.ts index 9d1b43e..ec47401 100644 --- a/src/wrapper/firebase.ts +++ b/src/wrapper/firebase.ts @@ -4,7 +4,7 @@ import { config } from "dotenv"; config(); initializeApp({ - credential: cert(JSON.parse(process.env["firebase_cert"] as string)), + credential: cert(JSON.parse(process.env.FIREBASE_CERT as string)), }); const db = getFirestore();