mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-21 14:04:38 +02:00
Fix deprecated UserFlags
This commit is contained in:
@@ -4,7 +4,7 @@ const { MessageEmbed } = require('discord.js');
|
|||||||
const { trimArray } = require('../../util/Util');
|
const { trimArray } = require('../../util/Util');
|
||||||
const flags = {
|
const flags = {
|
||||||
DISCORD_EMPLOYEE: 'Discord Employee',
|
DISCORD_EMPLOYEE: 'Discord Employee',
|
||||||
DISCORD_PARTNER: 'Discord Partner',
|
PARTNERED_SERVER_OWNER: 'Discord Partner',
|
||||||
BUGHUNTER_LEVEL_1: 'Bug Hunter (Level 1)',
|
BUGHUNTER_LEVEL_1: 'Bug Hunter (Level 1)',
|
||||||
BUGHUNTER_LEVEL_2: 'Bug Hunter (Level 2)',
|
BUGHUNTER_LEVEL_2: 'Bug Hunter (Level 2)',
|
||||||
HYPESQUAD_EVENTS: 'HypeSquad Events',
|
HYPESQUAD_EVENTS: 'HypeSquad Events',
|
||||||
@@ -15,8 +15,9 @@ const flags = {
|
|||||||
TEAM_USER: 'Team User',
|
TEAM_USER: 'Team User',
|
||||||
SYSTEM: 'System',
|
SYSTEM: 'System',
|
||||||
VERIFIED_BOT: 'Verified Bot',
|
VERIFIED_BOT: 'Verified Bot',
|
||||||
VERIFIED_DEVELOPER: 'Verified Bot Developer'
|
EARLY_VERIFIED_BOT_DEVELOPER: 'Early Verified Bot Developer'
|
||||||
};
|
};
|
||||||
|
const deprecated = ['DISCORD_PARTNER', 'VERIFIED_DEVELOPER'];
|
||||||
|
|
||||||
module.exports = class UserCommand extends Command {
|
module.exports = class UserCommand extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
@@ -39,7 +40,7 @@ module.exports = class UserCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async run(msg, { user }) {
|
async run(msg, { user }) {
|
||||||
const userFlags = user.flags ? user.flags.toArray() : [];
|
const userFlags = user.flags ? user.flags.toArray().filter(flag => !deprecated.includes(flag)) : [];
|
||||||
const embed = new MessageEmbed()
|
const embed = new MessageEmbed()
|
||||||
.setThumbnail(user.displayAvatarURL({ format: 'png', dynamic: true }))
|
.setThumbnail(user.displayAvatarURL({ format: 'png', dynamic: true }))
|
||||||
.setAuthor(user.tag)
|
.setAuthor(user.tag)
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiao",
|
"name": "xiao",
|
||||||
"version": "119.38.0",
|
"version": "119.38.1",
|
||||||
"description": "Your personal server companion.",
|
"description": "Your personal server companion.",
|
||||||
"main": "Xiao.js",
|
"main": "Xiao.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user