This commit is contained in:
Dragon Fire
2024-04-07 17:10:56 -04:00
parent fbe2244d2f
commit 606f1656ef
2 changed files with 5 additions and 1 deletions
+4 -1
View File
@@ -1,5 +1,8 @@
const Command = require('../../framework/Command');
const { DataResolver } = require('discord.js');
const { REST, Routes } = require('@discordjs/rest');
const { XIAO_TOKEN } = process.env;
const rest = new REST({ version: '10' }).setToken(XIAO_TOKEN);
module.exports = class BannerCommand extends Command {
constructor(client) {
@@ -21,7 +24,7 @@ module.exports = class BannerCommand extends Command {
}
async run(msg, { image }) {
await this.client.rest.patch('/users/@me', {
await rest.patch(Routes.user(), {
body: { banner: await DataResolver.resolveImage(image) }
});
return msg.say('Set the banner.');
+1
View File
@@ -32,6 +32,7 @@
"dependencies": {
"@discordjs/collection": "^2.0.0",
"@discordjs/opus": "^0.9.0",
"@discordjs/rest": "^2.2.0",
"@discordjs/voice": "^0.16.1",
"@mediapipe/face_detection": "^0.4.1646425229",
"@tensorflow/tfjs-node": "^4.17.0",