🎨 intents now in config

This commit is contained in:
Axel Olausson Holtenäs 2022-04-16 12:38:20 +02:00
parent 40d945c535
commit 2ddb8f98b3
No known key found for this signature in database
GPG key ID: 7BF6826B76382CBA
2 changed files with 12 additions and 7 deletions

View file

@ -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,
];

View file

@ -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();