Revert "Merge remote-tracking branch 'origin/main' into main"

This reverts commit feb116b4df.
This commit is contained in:
Isaac
2021-10-26 23:25:38 +01:00
parent feb116b4df
commit f49a044340
15 changed files with 60 additions and 61 deletions

View File

@@ -148,7 +148,6 @@ module.exports = class CommandManager {
*/
async handle(interaction) {
if (!interaction.guild) return this.client.log.debug('Ignoring non-guild command interaction');
await interaction.deferReply();
const settings = await this.client.utils.getSettings(interaction.guild.id);
const i18n = this.client.i18n.getLocale(settings.locale);
@@ -166,7 +165,7 @@ module.exports = class CommandManager {
if (!bot_permissions.has(required_bot_permissions)) {
const perms = required_bot_permissions.map(p => `\`${p}\``).join(', ');
if (bot_permissions.has('EMBED_LINKS')) {
await interaction.editReply({
await interaction.reply({
embeds: [
new MessageEmbed()
.setColor('ORANGE')
@@ -175,7 +174,7 @@ module.exports = class CommandManager {
]
});
} else {
await interaction.editReply({ content: i18n('bot.missing_permissions.description', perms) });
await interaction.reply({ content: i18n('bot.missing_permissions.description', perms) });
}
return;
}
@@ -183,7 +182,7 @@ module.exports = class CommandManager {
const missing_permissions = command.permissions instanceof Array && !interaction.member.permissions.has(command.permissions);
if (missing_permissions) {
const perms = command.permissions.map(p => `\`${p}\``).join(', ');
return await interaction.editReply({
return await interaction.reply({
embeds: [
new MessageEmbed()
.setColor(settings.error_colour)
@@ -200,7 +199,7 @@ module.exports = class CommandManager {
} catch (e) {
this.client.log.warn(`An error occurred whilst executing the ${command.name} command`);
this.client.log.error(e);
await interaction.editReply({
await interaction.reply({
embeds: [
new MessageEmbed()
.setColor('ORANGE')