🎨 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
|
// Discord API token
|
||||||
export const token = "";
|
export const token = "";
|
||||||
|
|
||||||
// Discord API id
|
// Discord API id
|
||||||
export const clientId = "";
|
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
|
// Dependencies
|
||||||
import "tsconfig-paths/register"; // Allows using tsconfig.json paths during runtime
|
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 locale from "@locale";
|
||||||
import database from "@database";
|
import database from "@database";
|
||||||
|
@ -10,15 +10,11 @@ import events from "@handlers/events";
|
||||||
import commands from "@handlers/commands";
|
import commands from "@handlers/commands";
|
||||||
|
|
||||||
// Configurations
|
// Configurations
|
||||||
import { token } from "@config/discord";
|
import { token, intents } from "@config/discord";
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
const client = new Client({
|
const client = new Client({
|
||||||
intents: [
|
intents,
|
||||||
Intents?.FLAGS?.GUILDS,
|
|
||||||
Intents?.FLAGS?.GUILD_MESSAGES,
|
|
||||||
Intents?.FLAGS?.GUILD_MEMBERS,
|
|
||||||
],
|
|
||||||
});
|
});
|
||||||
|
|
||||||
await locale();
|
await locale();
|
||||||
|
|
Loading…
Add table
Reference in a new issue