From 91c32bfad50943fd1b39818e3890887ceecd931a Mon Sep 17 00:00:00 2001 From: FreshImmuc Date: Mon, 25 Jul 2022 00:53:03 +0200 Subject: [PATCH] Changed templates.ts to support Discord.js v14. --- src/templates/templates.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/templates/templates.ts b/src/templates/templates.ts index af3e8a6..203e5d8 100644 --- a/src/templates/templates.ts +++ b/src/templates/templates.ts @@ -6,10 +6,10 @@ export function getEnvTemplate(token: string, prefix: string) { export function getMainFile() { return ` -const { Client, Intents } = require('discord.js'); +const { Client, GatewayIntentBits } = require('discord.js'); const { registerCommands, registerEvents } = require('./utils/registry'); const config = require('../slappey.json'); -const client = new Client({ intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES ] }); +const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages ] }); (async () => { client.commands = new Map();