fix a bunch of stuff that is bad practice
This commit is contained in:
parent
fa0be297ba
commit
9e77c291cb
8 changed files with 14 additions and 14 deletions
|
@ -28,6 +28,6 @@ module.exports = class Avatar extends Command {
|
|||
.setDescription(`[Global avatar](${user.avatarURL({extension: 'png', 'size': 4096})})`)
|
||||
.setImage(member.displayAvatarURL({extension: 'png', 'size': 4096}));
|
||||
|
||||
await interaction.reply({embeds: [embed]});
|
||||
interaction.reply({embeds: [embed]});
|
||||
}
|
||||
};
|
|
@ -47,7 +47,7 @@ module.exports = class Avatar extends Command {
|
|||
.setColor(client.functions.embedColor(guild))
|
||||
.setTitle(guild.name)
|
||||
.setThumbnail(guild.iconURL({extension: 'png', 'size': 4096}))
|
||||
.addFields([
|
||||
.addFields(
|
||||
{
|
||||
name: 'ID', value: guild.id, inline: true
|
||||
},
|
||||
|
@ -84,7 +84,7 @@ module.exports = class Avatar extends Command {
|
|||
{
|
||||
name: 'Features', value: guild.features.join(', ')
|
||||
}
|
||||
]);
|
||||
);
|
||||
interaction.reply({ embeds: [embed] });
|
||||
}
|
||||
};
|
|
@ -44,7 +44,7 @@ module.exports = class Avatar extends Command {
|
|||
.setTitle(member.user.username + '#' + member.user.discriminator)
|
||||
.setColor(user.hexAccentColor ?? member.displayHexColor)
|
||||
.setThumbnail(member.displayAvatarURL({extension: 'png', 'size': 4096}))
|
||||
.addFields([
|
||||
.addFields(
|
||||
{
|
||||
name: 'Display Name', value: member.nick || user.username, inline: true
|
||||
},
|
||||
|
@ -63,10 +63,10 @@ module.exports = class Avatar extends Command {
|
|||
{
|
||||
name: 'Joined Discord', value: time(user.createdAt, 'D') + time(user.createdAt, 'R'), inline: true
|
||||
}
|
||||
]);
|
||||
);
|
||||
if (badges.length > 0) {
|
||||
embed.setDescription(badges.join(' '));
|
||||
}
|
||||
return await interaction.reply({embeds: [embed]});
|
||||
return interaction.reply({embeds: [embed]});
|
||||
}
|
||||
};
|
|
@ -64,7 +64,7 @@ module.exports = class Weather extends Command {
|
|||
.setTitle('Current conditions in ' + city.toProperCase() + ', ' + ISO2.code[json.sys.country])
|
||||
.setThumbnail(`https://openweathermap.org/img/wn/${json.weather[0].icon}@4x.png`)
|
||||
.setColor(embedColor)
|
||||
.addFields([
|
||||
.addFields(
|
||||
{ name: 'Condition:', value: json.weather[0].main, inline: true },
|
||||
{ name: 'Temperature:', value: `${tempCelsius}°C ・ ${Math.round(json.main.temp * 9/5 - 459.67)}°F`, inline: true },
|
||||
{ name: 'Min/Max:', value:`
|
||||
|
@ -74,7 +74,7 @@ module.exports = class Weather extends Command {
|
|||
{ name: 'Humidity:', value: `${json.main.humidity}%`, inline: true },
|
||||
{ name: 'Wind Speed:', value: `${Math.round(json.wind.speed * 10) / 10}km/h ・ ${Math.round(json.wind.speed * 10 / 1.609344)}mi/h`, inline: true },
|
||||
{ name: 'Wind Direction:', value: windrose.getPoint(json.wind.deg).name, inline: true}
|
||||
])
|
||||
)
|
||||
.setFooter({ text: 'Powered by openweathermap.org'});
|
||||
|
||||
return interaction.reply({embeds: [embed]});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue