From 884e1acf7d3982e66f28dc2cd68e74325f704c6c Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Mon, 28 Mar 2022 14:25:23 -0400 Subject: Added more buttons to control command --- deploy-command.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'deploy-command.js') diff --git a/deploy-command.js b/deploy-command.js index e11458a..c85637f 100644 --- a/deploy-command.js +++ b/deploy-command.js @@ -1,13 +1,13 @@ -const fs = require('node:fs'); -const { REST } = require('@discordjs/rest'); -const { Routes } = require('discord-api-types/v9'); -const config = require('./config.json'); +import fs from 'node:fs' +import { REST } from '@discordjs/rest' +import { Routes } from 'discord-api-types/v9' +import config from './config.json' assert {type: 'json'} const commands = []; const commandFiles = fs.readdirSync('./commands').filter(file => file.endsWith('.js')); for (const file of commandFiles) { - const command = require(`./commands/${file}`); + const { default: command } = await import(`./commands/${file}`); commands.push(command.data.toJSON()); } -- cgit v1.2.3