Bug fix commands in dms

This commit is contained in:
2023-11-30 16:09:18 +01:00
parent 44d24024d8
commit dcacf824d9
8 changed files with 18 additions and 20 deletions

View File

@@ -13,8 +13,7 @@ module.exports = {
.setDescription("Check a player's stats.") .setDescription("Check a player's stats.")
.addStringOption((option) => option.setName("ign") .addStringOption((option) => option.setName("ign")
.setDescription("The player's IGN.") .setDescription("The player's IGN.")
.setRequired(true)) .setRequired(true)),
.setDMPermission(false),
/** @param { import('discord.js').ChatInputCommandInteraction } interaction */ /** @param { import('discord.js').ChatInputCommandInteraction } interaction */
@@ -216,8 +215,8 @@ module.exports = {
url: head url: head
}, },
footer: { footer: {
text: interaction.guild.name + " | " + devMessage, text: interaction?.guild.name || interaction.user.username + " | " + devMessage,
icon_url: interaction.guild.iconURL() icon_url: interaction?.guild.iconURL() || interaction.user.avatarURL()
}, },
fields: statsFields fields: statsFields
}] }]

View File

@@ -32,8 +32,7 @@ module.exports = {
.setDescription("The IGN of a member.") .setDescription("The IGN of a member.")
.setRequired(true) .setRequired(true)
) )
) ),
.setDMPermission(false),
/** @param { import('discord.js').ChatInputCommandInteraction } interaction */ /** @param { import('discord.js').ChatInputCommandInteraction } interaction */
@@ -59,8 +58,8 @@ module.exports = {
description: "This command is currently under development", description: "This command is currently under development",
color: embedColor, color: embedColor,
footer: { footer: {
text: interaction.guild.name + " | " + devMessage, text: interaction?.guild.name || interaction.user.username + " | " + devMessage,
icon_url: interaction.guild.iconURL({ dynamic: true }) icon_url: interaction?.guild.iconURL({ dynamic: true }) || interaction.user.avatarURL({ dynamic: true })
} }
}] }]
}) })

View File

@@ -95,8 +95,8 @@ async function guildInfo(interaction) {
], ],
color: embedColor, color: embedColor,
footer: { footer: {
text: interaction.guild.name + " | " + devMessage, text: interaction?.guild.name || interaction.user.username + " | " + devMessage,
icon_url: interaction.guild.iconURL({ dynamic: true }) icon_url: interaction?.guild.iconURL({ dynamic: true }) || interaction.user.avatarURL({ dynamic: true })
} }
}] }]
}) })

View File

@@ -32,8 +32,8 @@ async function guildMember(interaction) {
url: head, url: head,
}, },
footer: { footer: {
text: interaction.guild.name + " | " + devMessage, text: interaction?.guild.name || interaction.user.username + " | " + devMessage,
icon_url: interaction.guild.iconURL({ dynamic: true }), icon_url: interaction?.guild.iconURL({ dynamic: true }) || interaction.user.avatarURL({ dynamic: true }),
}, },
}, },
], ],

View File

@@ -46,8 +46,8 @@ module.exports = {
url: interaction.guild.iconURL({ dynamic: true }) url: interaction.guild.iconURL({ dynamic: true })
}, },
footer: { footer: {
icon_url: interaction.guild.iconURL({ dynamic: true }), icon_url: interaction?.guild.iconURL({ dynamic: true }) || interaction.user.avatarURL({ dynamic: true }),
text: interaction.guild.name + " | " + devMessage text: interaction?.guild.name || interaction.user.username + " | " + devMessage
} }
}] }]
}) })

View File

@@ -27,8 +27,8 @@ module.exports = {
description: "Ping of the bot is " + client.ws.ping + "ms.", description: "Ping of the bot is " + client.ws.ping + "ms.",
color: embedColor, color: embedColor,
footer: { footer: {
text: interaction.guild.name, text: interaction?.guild.name || interaction.user.username,
icon_url: interaction.guild.iconURL({ dynamic: true }) icon_url: interaction?.guild.iconURL({ dynamic: true }) || interaction.user.avatarURL({ dynamic: true })
}, },
timestamp: new Date() timestamp: new Date()
}] }]

View File

@@ -44,8 +44,8 @@ module.exports = {
} }
], ],
footer: { footer: {
text: interaction.guild.name + " | " + devMessage, text: interaction?.guild.name || interaction.user.username + " | " + devMessage,
icon_url: interaction.guild.iconURL() icon_url: interaction?.guild.iconURL() || interaction.user.avatarURL()
} }
}] }]
}) })

View File

@@ -47,8 +47,8 @@ module.exports = {
url: head url: head
}, },
footer: { footer: {
text: interaction.guild.name + " | " + devMessage, text: interaction?.guild.name || interaction.user.username + " | " + devMessage,
icon_url: interaction.guild.iconURL({ dynamic: true }) icon_url: interaction?.guild.iconURL({ dynamic: true }) || interaction.user.avatarURL({ dynamic: true })
} }
}] }]
}) })