mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Fix
This commit is contained in:
@@ -1,5 +1,8 @@
|
|||||||
const Command = require('../../framework/Command');
|
const Command = require('../../framework/Command');
|
||||||
const { DataResolver } = require('discord.js');
|
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 {
|
module.exports = class BannerCommand extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
@@ -21,7 +24,7 @@ module.exports = class BannerCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async run(msg, { image }) {
|
async run(msg, { image }) {
|
||||||
await this.client.rest.patch('/users/@me', {
|
await rest.patch(Routes.user(), {
|
||||||
body: { banner: await DataResolver.resolveImage(image) }
|
body: { banner: await DataResolver.resolveImage(image) }
|
||||||
});
|
});
|
||||||
return msg.say('Set the banner.');
|
return msg.say('Set the banner.');
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@discordjs/collection": "^2.0.0",
|
"@discordjs/collection": "^2.0.0",
|
||||||
"@discordjs/opus": "^0.9.0",
|
"@discordjs/opus": "^0.9.0",
|
||||||
|
"@discordjs/rest": "^2.2.0",
|
||||||
"@discordjs/voice": "^0.16.1",
|
"@discordjs/voice": "^0.16.1",
|
||||||
"@mediapipe/face_detection": "^0.4.1646425229",
|
"@mediapipe/face_detection": "^0.4.1646425229",
|
||||||
"@tensorflow/tfjs-node": "^4.17.0",
|
"@tensorflow/tfjs-node": "^4.17.0",
|
||||||
|
|||||||
Reference in New Issue
Block a user