Answer the question
In order to leave comments, you need to log in
Displaying a link to the avatar. Where is the error?
Hello.
I'm trying to make a command for the bot to display the target's avatar.
I got a code that doesn't work.
Help me please.
const { Command } = require('discord.js-commando');
module.exports = class avatarCommand extends Command {
constructor(client) {
super(client, {
name: 'avatar',
memberName: 'avatar',
group: 'other',
description: ""
});
}
async run(message, args) {
var avatar = author.avatarURL;
message.reply("аватар:" + avatar);
}
}
Answer the question
In order to leave comments, you need to log in
And what exactly should work here?
Where does the author variable come from?
How will the bot get the token? Where is the main part of the work with the bot?
Don't use commando at all. What do you dislike about regular discrod.js?
Here is an example suitable for your request: https://discord.js.org/#/docs/main/stable/examples...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question