Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- client.on("messageCreate",async message =>{
- if(message.content.startsWith(prefix +"avatar")){//https://discord.gg/thailandcodes
- let row = new Discord.MessageActionRow()//https://discord.gg/thailandcodes
- .addComponents(//https://discord.gg/thailandcodes
- new Discord.MessageButton()//https://discord.gg/thailandcodes
- .setLabel("Avatar")//https://discord.gg/thailandcodes
- .setStyle("SECONDARY")//https://discord.gg/thailandcodes
- .setCustomId(`avatar_${message.author.id}`),//https://discord.gg/thailandcodes
- new Discord.MessageButton()
- .setLabel("Banner")//https://discord.gg/thailandcodes
- .setStyle("SECONDARY")
- .setCustomId(`banner_${message.author.id}`),//https://discord.gg/thailandcodes
- )
- let args = message.content.split(" ")
- let user = message.mentions.members.first() || message.guild.members.cache.get(args[1])
- let member = message.author;
- let embed1 = new Discord.MessageEmbed()
- .setAuthor({name:member.tag,iconURL:member.avatarURL({dynamic:true})})
- .setTitle("Avatar URL")
- .setImage(member.avatarURL({dynamic:true , size:1024} || member.displayAvatarURL()))
- .setURL(`${member.avatarURL({dynamic:true, size:1024}) || member.displayAvatarURL()}`)
- .setColor("#0067ff")
- if(!user) return await message.channel.send({embeds:[embed1],components:[row]})
- if (user.user.bot) return message.channel.send({content:"بوتات مره واحده يا جاحد"})
- let embed = new Discord.MessageEmbed()//https://discord.gg/thailandcodes
- .setAuthor({name:user.user.tag,iconURL:user.user.avatarURL({dynamic:true})})
- .setTitle("Avatar URL")//https://discord.gg/thailandcodes
- .setImage(user.user.avatarURL({dynamic:true , size:1024} || user.user.displayAvatarURL()))
- .setURL(`${user.user.avatarURL({dynamic:true, size:1024}) || user.user.displayAvatarURL()}`)
- .setColor("#0067ff")//https://discord.gg/thailandcodes
- let bann = await client.users.fetch(user.user, {withBanner: true , force: true})
- //https://discord.gg/thailandcodes
- let row2 = new Discord.MessageActionRow()
- .addComponents(//https://discord.gg/thailandcodes
- new Discord.MessageButton()
- .setLabel("Banner")//https://discord.gg/thailandcodes
- .setURL(bann.bannerURL({dynamic:true , size:4096}) || `https://serux.pro/rendercolour?hex=${bann.hexAccentColor.replace(/#/g, '')}&height=200&width=512`)//https://discord.gg/thailandcodes
- .setStyle("LINK")
- )//https://discord.gg/thailandcodes
- if(user) return message.channel.send({embeds:[embed],components:[row2]})
- }
- })
- client.on("interactionCreate", async interaction => {
- let row = new Discord.MessageActionRow()
- .addComponents(
- new Discord.MessageButton()
- .setLabel("Avatar")//https://discord.gg/thailandcodes
- .setStyle("SECONDARY")
- .setCustomId(`avatar_${interaction.user.id}`),//https://discord.gg/thailandcodes
- new Discord.MessageButton()//https://discord.gg/thailandcodes
- .setLabel("Banner")
- .setStyle("SECONDARY")//https://discord.gg/thailandcodes
- .setCustomId(`banner_${interaction.user.id}`),
- )//https://discord.gg/thailandcodes
- if(interaction.customId.startsWith(`avatar_${interaction.user.id}`)){//https://discord.gg/thailandcodes
- let avatar = new Discord.MessageEmbed()//https://discord.gg/thailandcodes
- .setAuthor({name:interaction.user.tag,iconURL:interaction.user.avatarURL({dynamic:true})})
- .setTitle("Avatar URL")
- .setURL(`${interaction.user.avatarURL({dynamic:true, size:1024}) || interaction.user.displayAvatarURL()}`)
- .setImage(`${interaction.user.avatarURL({dynamic:true, size:1024}) || interaction.user.displayAvatarURL()}`)
- .setColor("#0067ff")
- interaction.update({embeds:[avatar],components:[row]}).catch(() => console.log("Hi"))
- //https://discord.gg/thailandcodes
- }
- })//https://discord.gg/thailandcodes
- client.on("interactionCreate", async interaction => {
- let row = new Discord.MessageActionRow()//https://discord.gg/thailandcodes
- .addComponents(//https://discord.gg/thailandcodes
- new Discord.MessageButton()//https://discord.gg/thailandcodes
- .setLabel("Avatar")
- .setStyle("SECONDARY")//https://discord.gg/thailandcodes
- .setCustomId(`avatar_${interaction.user.id}`),
- new Discord.MessageButton()//https://discord.gg/thailandcodes
- .setLabel("Banner")
- .setStyle("SECONDARY")//https://discord.gg/thailandcodes
- .setCustomId(`banner_${interaction.user.id}`),
- )
- if(interaction.customId.startsWith(`banner_${interaction.user.id}`)){
- let bann = await client.users.fetch(interaction.user.id, {withBanner: true , force: true})
- let banner = new Discord.MessageEmbed()//https://discord.gg/thailandcodes
- .setAuthor({name:interaction.user.tag,iconURL:interaction.user.avatarURL({dynamic:true})})
- .setTitle("Banner URL")//https://discord.gg/thailandcodes
- .setDescription(`Hex Color: __**${bann.hexAccentColor}**__`)//https://discord.gg/thailandcodes
- .setURL(bann.bannerURL({dynamic:true , size:4096}) || `https://serux.pro/rendercolour?hex=${bann.hexAccentColor.replace(/#/g, '')}&height=200&width=512`)//https://discord.gg/thailandcodes
- .setImage(bann.bannerURL({dynamic:true , size:4096}) || `https://serux.pro/rendercolour?hex=${bann.hexAccentColor.replace(/#/g, '')}&height=200&width=512`)
- .setColor("#0067ff")//https://discord.gg/thailandcodes
- interaction.update({embeds:[banner],components:[row]}).catch(() => console.log("Hi"))
- }//https://discord.gg/thailandcodes
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement