.setDescription("Get info on an emoji, such as its ID, name, and a link to the source image. You can also use this for the `robemoji` command to add an emoji by its ID.")
.setDescription("Get info on an emoji, such as its ID, name, and a link to the source image. You can also use this for the `robemoji` command to add an emoji by its ID.")
if(!emotes.length){returnmessage.channel.send("It doesn't look like anyone has sent any emoji recently. Try using the command again but adding an emoji to the message to get info on it.");}
letemoteEmbeds=[];
emotes.forEach(emote=>{
letspl=emote.split(':');
letfinEm=newDiscord.MessageEmbed()
.setTitle("Emoji Info")
.setDescription(`Name: ${spl[1]?`\`:${spl[1]}:\``:"Not Found"}\nID: ${spl[2].slice(0,spl[2].length-1)}\nURL: [Here](${`https://cdn.discordapp.com/emojis/${spl[2].slice(0,spl[2].length-1)}${spl[0].includes('a')?'.gif':""}`})\nAnimated: ${spl[0].includes('a')===true}\n\nI have access: ${client.emojis.cache.has(spl[2].slice(0,spl[2].length-1))}`)
if(client.emojis.cache.has(spl[2].slice(0,spl[2].length-1))&&client.emojis.cache.get(spl[2].slice(0,spl[2].length-1)).guild.members.cache.has(message.author.id)&&client.emojis.cache.get(spl[2].slice(0,spl[2].length-1)).guild.id!==(message.guild?message.guild.id:1)){finEm.addField("Server",`You're in the server this emoji is from: **${client.emojis.cache.get(spl[2].slice(0,spl[2].length-1)).guild.name}**`);}
if(!args[0].match(/^<a?:.+:\d+>$|^\d+$/gm)){returnmessage.channel.send("That doesn't seem to be a valid emoji! (Standard Discord emojis don't count :p )");}
if(!args[0].match(/^<a?:.+:\d+>$|^\d+$/gm)){returnmessage.channel.send("That doesn't seem to be a valid emoji! (Standard Discord emojis don't count :p )");}
if(access&&client.emojis.cache.get(id).guild.members.cache.has(message.author.id)&&client.emojis.cache.get(id).guild.id!==message.guild?message.guild.id:1){finEm.addField("Server",`You're in the server this emoji is from: **${client.emojis.cache.get(id).guild.name}**`);}
if(access&&client.emojis.cache.get(id).guild.members.cache.has(message.author.id)&&client.emojis.cache.get(id).guild.id!==(message.guild?message.guild.id:1)){finEm.addField("Server",`You're in the server this emoji is from: **${client.emojis.cache.get(id).guild.name}**`);}
returnmessage.channel.send(finEm);
returnmessage.channel.send(finEm);
}catch{
}catch{
returnmessage.channel.send("There was an error getting info for that emoji. You may not have given a valid emoji, or the ID you gave doesn't lead to a real emoji.");
returnmessage.channel.send("There was an error getting info for that emoji. You may not have given a valid emoji, or the ID you gave doesn't lead to a real emoji.");