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.');