mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-25 06:34:58 +05:00
wtf discord?????
This commit is contained in:
parent
8265e1ad8d
commit
8c139da4c2
3 changed files with 6 additions and 3 deletions
|
@ -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({
|
||||||
|
|
|
@ -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],
|
||||||
|
|
|
@ -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" }`);
|
||||||
|
|
Loading…
Reference in a new issue