Added add emoji and changed ids
parent
b78eab4a35
commit
53546658f9
|
@ -0,0 +1,36 @@
|
|||
const { Message, Client, Permissions } = require("discord.js");
|
||||
const Discord = require('discord.js')
|
||||
|
||||
module.exports = {
|
||||
name: "addemoji",
|
||||
aliases: [''],
|
||||
/**
|
||||
*
|
||||
* @param {Client} client
|
||||
* @param {Message} message
|
||||
* @param {String[]} args
|
||||
*/
|
||||
run: async (client, message, args) => {
|
||||
if(!message.member.permissions.has(Permissions.FLAGS.MANAGE_EMOJIS_AND_STICKERS, Permissions.FLAGS.ADMINISTRATOR))
|
||||
// if someone dont hv perm it will send this message
|
||||
message.channel.send("You don't have permission to use that command.");
|
||||
|
||||
else {
|
||||
if (!args.length) return message.channel('Please specify an emoji!!')
|
||||
|
||||
for (const emojis of args) {
|
||||
const getEmoji = Discord.Util.parseEmoji(emojis);
|
||||
|
||||
if (getEmoji.id) {
|
||||
const emojiExt = getEmoji.animated ? ".gif" : ".png";
|
||||
const emojiURL = `https://cdn.discordapp.com/emojis/${getEmoji.id + emojiExt}`
|
||||
|
||||
message.guild.emojis.create(emojiURL, getEmoji.name).then(emoji =>
|
||||
message.channel.send(`Successfully added: ${emoji} - ${emoji.name} to the server!!`))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
}
|
|
@ -5,10 +5,10 @@ const discord = require('discord.js');
|
|||
|
||||
client.on('guildMemberAdd', async guildmember =>{
|
||||
const guild = client.guilds.cache.get('427865794467069962');
|
||||
const welcomechannel =client.channels.cache.get('427875246801027072')
|
||||
if(guild == guildmember.guild.id )
|
||||
const welcomechannel = client.channels.cache.get('427875246801027072')
|
||||
if(guild == '427865794467069962')
|
||||
{
|
||||
welcomechannel.send(`<:hi:858281121611513897> Welcome! **${guildmember.user}** has just joined the server! Grab some roles from: <#427873938333499404> and let us know who you are within <#427874873898041346>`);
|
||||
welcomechannel.send(`<a:WavingHand:973689926258393169> Welcome! **${guildmember.user}** has just joined the server! Grab some roles from <#427873938333499404> and let us know who you are within <#427874873898041346>`);
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue