.env.example

This commit is contained in:
kdh8219 2023-04-27 23:19:06 +09:00
parent e53ee68011
commit 83ce565636
3 changed files with 15 additions and 3 deletions

12
.env.example Normal file
View file

@ -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 = ""

View file

@ -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 // The put method is used to fully refresh all commands in the guild with the current set
await rest.put( await rest.put(
Routes.applicationGuildCommands( Routes.applicationGuildCommands(
process.env.discord_CLIENT_ID as string, process.env.DISCORD_CLIENT_ID as string,
process.env.discord_GUILD_ID as string process.env.DISCORD_TARGET_GUILD_ID as string
), ),
{ body: commands } { body: commands }
); );

View file

@ -4,7 +4,7 @@ import { config } from "dotenv";
config(); config();
initializeApp({ initializeApp({
credential: cert(JSON.parse(process.env["firebase_cert"] as string)), credential: cert(JSON.parse(process.env.FIREBASE_CERT as string)),
}); });
const db = getFirestore(); const db = getFirestore();