I'm getting this:
(node:5496) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: Cannot read prope rty 'map' of null
(node:5496) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Everytime i run my "userinfo" command
const prefix = require('../../settings.json').prefix;
const Discord = require('discord.js');
const commando = require('discord.js-commando');
class UserInfo extends commando.Command {
constructor(client) {
super(client, {
name: 'userinfo',
group: 'showinfo',
memberName: 'userinfo',
description: 'Muestra la información de un usuario.'
});
}
async run (message, args) {
if(message.author.bot) return;
if(message.channel.type === "dm") return;
var embed = new Discord.RichEmbed()
.setAuthor(message.author.username)
.setDescription("Usuario rikolino.")
.setColor("#3535353")
.addField("Usuario", '${message.author.username}#${message.author.discriminator}')
.addField("ID", message.author.id)
.addField("Creación", message.author.createdAt);
message.channel.sendEmbed(embed);
return;
}
}
module.exports = UserInfo;