🎨 intents now in config
This commit is contained in:
parent
40d945c535
commit
2ddb8f98b3
2 changed files with 12 additions and 7 deletions
|
@ -1,5 +1,14 @@
|
|||
import { Intents } from "discord.js"; // discord.js
|
||||
|
||||
// Discord API token
|
||||
export const token = "";
|
||||
|
||||
// Discord API id
|
||||
export const clientId = "";
|
||||
|
||||
// Discord API intents
|
||||
export const intents = [
|
||||
Intents.FLAGS.GUILDS,
|
||||
Intents.FLAGS.GUILD_MESSAGES,
|
||||
Intents.FLAGS.GUILD_MEMBERS,
|
||||
];
|
||||
|
|
10
src/index.ts
10
src/index.ts
|
@ -1,6 +1,6 @@
|
|||
// Dependencies
|
||||
import "tsconfig-paths/register"; // Allows using tsconfig.json paths during runtime
|
||||
import { Client, Intents } from "discord.js"; // discord.js
|
||||
import { Client } from "discord.js"; // discord.js
|
||||
|
||||
import locale from "@locale";
|
||||
import database from "@database";
|
||||
|
@ -10,15 +10,11 @@ import events from "@handlers/events";
|
|||
import commands from "@handlers/commands";
|
||||
|
||||
// Configurations
|
||||
import { token } from "@config/discord";
|
||||
import { token, intents } from "@config/discord";
|
||||
|
||||
async function main() {
|
||||
const client = new Client({
|
||||
intents: [
|
||||
Intents?.FLAGS?.GUILDS,
|
||||
Intents?.FLAGS?.GUILD_MESSAGES,
|
||||
Intents?.FLAGS?.GUILD_MEMBERS,
|
||||
],
|
||||
intents,
|
||||
});
|
||||
|
||||
await locale();
|
||||
|
|
Loading…
Add table
Reference in a new issue