if(!message.member.permissions.has("MANAGE_EMOJIS_AND_STICKERS")){returnmessage.channel.send("You must have permissions to manage emoji in this server.");}
if(!message.guild.me.permissions.has("MANAGE_EMOJIS_AND_STICKERS")){returnmessage.channel.send("I don't have permissions to manage emoji in this server, so I can't add any emotes.");}
]}).then(()=>require('../../util/ask')(message,"If you'd like to rename the emoji, send the name now. Otherwise, wait 30 seconds and nothing will happen.",30000,false,false)
.catch(()=>{returnmessage.channel.send("For some reason, the emoji was not able to be renamed. Please do so manually");});
}
})
)).catch(()=>message.channel.send("<a:NC_x:717396078294597643> There was an error trying to create that emoji. I might not have permissions to add emoji, or the server may be at its emoji limit."));
if(!args[0].match(/^<a?:.+:\d+>$|^https:\/\/.+$|^\d+$/)){returnmessage.channel.send("It doesn't look like you gave me a valid emoji to steal or a URL to make an emoji from.");}
if(!args[1]&&!args[0].match(/^<a?:.+:\d+>$/)){returnmessage.channel.send("You specified a URL/ID but didn't give an emoji name. Please try again and give the name you'd like to make the emoji.");}
.catch(()=>message.channel.send("<a:NC_x:717396078294597643> There was an error trying to create that emoji. I might not have permissions to add emoji, the server may be at its emoji limit, you may have given a bad URL, not specified the emoji properly, or the file type in the URL you gave is invalid."));