mirror of
https://github.com/Myxelium/RandomMemerBot.git
synced 2026-04-23 06:15:09 +00:00
Larger refactoring and added avoidlist
This commit is contained in:
18
helpers/setup-discord-client.ts
Normal file
18
helpers/setup-discord-client.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { Client, GatewayIntentBits } from "discord.js";
|
||||
|
||||
export function SetupDiscordCLient(): Client{
|
||||
const discordClient = new Client({
|
||||
intents: [
|
||||
GatewayIntentBits.Guilds,
|
||||
GatewayIntentBits.GuildMessages,
|
||||
GatewayIntentBits.MessageContent,
|
||||
GatewayIntentBits.GuildVoiceStates,
|
||||
GatewayIntentBits.GuildIntegrations,
|
||||
],
|
||||
});
|
||||
const discordApplicationToken = process.env.TOKEN; // Discord bot token from .env file (required) More info: https://discordgsm.com/guide/how-to-get-a-discord-bot-token
|
||||
|
||||
discordClient.login(discordApplicationToken);
|
||||
|
||||
return discordClient;
|
||||
}
|
||||
Reference in New Issue
Block a user