Files
discordeno/examples/beginner/configs.ts
Skillz4Killz c1efa83bd9 Bot pkg (#2740)
* fix: bot pkg test

* Fix code style issues with ESLint

* Update Guild.ts

* Update Guild.ts

* Fix code style issues with ESLint

Co-authored-by: Lint Action <lint-action@samuelmeuli.com>
Co-authored-by: Jonathan Ho <heiheiho000@gmail.com>
2023-01-26 09:11:24 -06:00

20 lines
557 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!),
};