mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-01 08:20:08 +00:00
20 lines
551 B
TypeScript
20 lines
551 B
TypeScript
import { dotEnvConfig } from './deps.ts.js'
|
|
|
|
// Get the .env file that the user should have created, and get the token
|
|
const env = dotEnvConfig({ export: true, path: './.env' })
|
|
const token = env.BOT_TOKEN || ''
|
|
|
|
export interface Config {
|
|
token: string
|
|
botId: bigint
|
|
}
|
|
|
|
export const configs = {
|
|
/** Get token from ENV variable */
|
|
token,
|
|
/** Get the BotId from the token */
|
|
botId: BigInt(atob(token.split('.')[0])),
|
|
/** The server id where you develop your bot and want dev commands created. */
|
|
devGuildId: BigInt(env.DEV_GUILD_ID!),
|
|
}
|