mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Fix
This commit is contained in:
@@ -11,14 +11,14 @@ module.exports = class ImageOrAvatarArgumentType extends ArgumentType {
|
||||
return this.client.registry.types.get('user').validate(value, msg, arg, currentMsg);
|
||||
}
|
||||
|
||||
async parse(value, msg, arg) {
|
||||
async parse(value, msg, arg, currentMsg) {
|
||||
const image = this.client.registry.types.get('image').parse(value, msg, arg, currentMsg);
|
||||
if (image) return image;
|
||||
const user = await this.client.registry.types.get('user').parse(value, msg, arg, currentMsg);
|
||||
return user.displayAvatarURL({ format: 'png', size: 512 });
|
||||
}
|
||||
|
||||
isEmpty(value, msg, arg) {
|
||||
isEmpty(value, msg, arg, currentMsg) {
|
||||
return this.client.registry.types.get('image').isEmpty(value, msg, arg, currentMsg)
|
||||
&& this.client.registry.types.get('user').isEmpty(value, msg, arg, currentMsg);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user