Boat
Boat
DIAdiscord.js - Imagine an app
Created by Boat on 9/2/2023 in #djs-questions
avatar options
oh it seem to still not work
9 replies
DIAdiscord.js - Imagine an app
Created by Boat on 9/2/2023 in #djs-questions
avatar options
if only i understand this stuff enough to answer you
9 replies
DIAdiscord.js - Imagine an app
Created by Boat on 9/2/2023 in #djs-questions
avatar options
thank you sir
9 replies
DIAdiscord.js - Imagine an app
Created by Boat on 9/2/2023 in #djs-questions
avatar options
const { SlashCommandBuilder } = require('discord.js');
const { EmbedBuilder } = require('discord.js')

module.exports = {
data: new SlashCommandBuilder()
.setName('avatar')
.setDescription('Embed Format Test')
.addUserOption(option => option.setName('target').setDescription('Display avatar of target'))

,
category: 'user',
async execute(interaction) {

//get target user avatar url
const avatar = interaction.options.getMember('target').user.displayAvatarURL() interaction.user.avatarURL();
const exampleEmbed = new EmbedBuilder()
.setColor(0x0099FF).setImage(avatar).setTimestamp()
.setFooter({ text: interaction.options.getMember('target').user.username || interaction.member.username })
return interaction.reply({ embeds: [exampleEmbed] });
;
},


};
const { SlashCommandBuilder } = require('discord.js');
const { EmbedBuilder } = require('discord.js')

module.exports = {
data: new SlashCommandBuilder()
.setName('avatar')
.setDescription('Embed Format Test')
.addUserOption(option => option.setName('target').setDescription('Display avatar of target'))

,
category: 'user',
async execute(interaction) {

//get target user avatar url
const avatar = interaction.options.getMember('target').user.displayAvatarURL() interaction.user.avatarURL();
const exampleEmbed = new EmbedBuilder()
.setColor(0x0099FF).setImage(avatar).setTimestamp()
.setFooter({ text: interaction.options.getMember('target').user.username || interaction.member.username })
return interaction.reply({ embeds: [exampleEmbed] });
;
},


};
9 replies