Discord.js v14

This commit is contained in:
Dragon Fire
2024-04-07 19:06:19 -04:00
parent 58c81aa912
commit f59826f7ab
272 changed files with 893 additions and 656 deletions
+2 -6
View File
@@ -1,9 +1,5 @@
const Command = require('../../framework/Command');
const { DataResolver } = require('discord.js');
const { REST } = require('@discordjs/rest');
const { Routes } = require('discord-api-types/v10');
const { XIAO_TOKEN } = process.env;
const rest = new REST({ version: '10' }).setToken(XIAO_TOKEN);
const { DataResolver, Routes } = require('discord.js');
module.exports = class BannerCommand extends Command {
constructor(client) {
@@ -25,7 +21,7 @@ module.exports = class BannerCommand extends Command {
}
async run(msg, { image }) {
await rest.patch(Routes.user(), {
await this.client.rest.patch(Routes.user(), {
body: { banner: await DataResolver.resolveImage(image) }
});
return msg.say('Set the banner.');
+4 -4
View File
@@ -1,5 +1,5 @@
const Command = require('../../framework/Command');
const { MessageEmbed } = require('discord.js');
const { EmbedBuilder } = require('discord.js');
const types = ['reject', 'info', 'approve'];
const typesColors = ['RED', 'YELLOW', 'GREEN'];
const displaytypes = ['❌ Rejected', '❓ Need More Info', '✅ Accepted/Fixed'];
@@ -35,11 +35,11 @@ module.exports = class ReportRespondCommand extends Command {
}
async run(msg, { user, type, message }) {
const embed = new MessageEmbed()
const embed = new EmbedBuilder()
.setDescription(message)
.setTitle(displaytypes[type])
.setAuthor(msg.author.tag)
.setFooter(`ID: ${msg.author.id}`)
.setAuthor({ name: msg.author.tag })
.setFooter({ text: `ID: ${msg.author.id}` })
.setTimestamp()
.setColor(typesColors[type]);
try {