wtf discord?????

This commit is contained in:
Jonny_Bro (Nikita) 2024-02-07 20:46:56 +05:00
parent 8265e1ad8d
commit 8c139da4c2
No known key found for this signature in database
GPG key ID: 391C19BE62D36B33
3 changed files with 6 additions and 3 deletions

View file

@ -24,7 +24,7 @@ class AvatarContext extends BaseCommand {
* @param {Object} data * @param {Object} data
*/ */
async execute(client, interaction) { async execute(client, interaction) {
const avatarURL = interaction.targetUser.avatarURL({ size: 2048 }); const avatarURL = interaction.targetUser.displayAvatarURL({ size: 2048 });
const embed = client.embed({ image: avatarURL }); const embed = client.embed({ image: avatarURL });
interaction.reply({ interaction.reply({

View file

@ -47,8 +47,9 @@ class Avatar extends BaseCommand {
*/ */
async execute(client, interaction) { async execute(client, interaction) {
const member = interaction.options.getMember("user") || interaction.member; const member = interaction.options.getMember("user") || interaction.member;
const avatarURL = interaction.options.getBoolean("server") ? member.avatarURL({ size: 2048 }) : member.user.avatarURL({ size: 2048 }); const avatarURL = interaction.options.getBoolean("server") ? member.displayAvatarURL({ size: 2048 }) : member.user.displayAvatarURL({ size: 2048 });
const embed = client.embed({ image: avatarURL }); const embed = client.embed({ image: avatarURL });
console.log(avatarURL);
interaction.reply({ interaction.reply({
embeds: [embed], embeds: [embed],

View file

@ -53,7 +53,9 @@ class CommandHandler extends BaseEvent {
userData.markModified("achievements"); userData.markModified("achievements");
await userData.save(); await userData.save();
try {
interaction.user.send(args); interaction.user.send(args);
} catch (e) { /**/ }
} }
client.logger.cmd(`User ${interaction.user.getUsername()} used ${command.command.name} in ${interaction.guild ? interaction.guild.name : "DM"} with arguments: ${interaction.options.data.length > 0 ? interaction.options.data.map(arg => { return `${arg.name}: ${arg.value}`; }).join(", ") : "no args" }`); client.logger.cmd(`User ${interaction.user.getUsername()} used ${command.command.name} in ${interaction.guild ? interaction.guild.name : "DM"} with arguments: ${interaction.options.data.length > 0 ? interaction.options.data.map(arg => { return `${arg.name}: ${arg.value}`; }).join(", ") : "no args" }`);