mirror of
https://github.com/ReVanced/revanced-bots.git
synced 2026-01-11 13:56:15 +00:00
fix(bot-discord): fix "Thinking..."
you have thinked for too long my child
This commit is contained in:
@@ -40,6 +40,6 @@ export default {
|
||||
actionTo: await client.users.fetch(interaction.options.getString('user')),
|
||||
actionBy: interaction.member,
|
||||
channel: interaction.channel
|
||||
});
|
||||
}, interaction);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -52,6 +52,6 @@ export default {
|
||||
actionBy: interaction.member,
|
||||
channel: interaction.channel,
|
||||
expire: parsedDuration
|
||||
});
|
||||
}, interaction);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -58,6 +58,6 @@ export default {
|
||||
actionBy: interaction.member,
|
||||
channel: interaction.channel,
|
||||
expire: parsedDuration
|
||||
});
|
||||
}, interaction);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -27,6 +27,6 @@ export default {
|
||||
actionTo: await client.users.fetch(interaction.options.getString('user')),
|
||||
actionBy: interaction.member,
|
||||
channel: interaction.channel
|
||||
});
|
||||
}, interaction);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -49,6 +49,6 @@ export default {
|
||||
actionTo: await client.users.fetch(interaction.options.getString('user')),
|
||||
actionBy: interaction.member,
|
||||
channel: interaction.channel,
|
||||
});
|
||||
}, interaction);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -49,6 +49,6 @@ export default {
|
||||
actionTo: await client.users.fetch(interaction.options.getString('user')),
|
||||
actionBy: interaction.member,
|
||||
channel: interaction.channel,
|
||||
});
|
||||
}, interaction);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -59,7 +59,7 @@ export default async function muteMember(config, member, { duration, reason, sup
|
||||
|
||||
// Remove the roles, give defined roles.
|
||||
if (!existingMute) {
|
||||
const currentRoles = member.roles.map((role) => role.id);
|
||||
const currentRoles = member.roles.cache.map((role) => role.id);
|
||||
let setRoles = [];
|
||||
for (const role of currentRoles) {
|
||||
if (takenRoles.includes(role)) continue;
|
||||
@@ -69,7 +69,7 @@ export default async function muteMember(config, member, { duration, reason, sup
|
||||
setRoles = setRoles.concat(supportMute ?
|
||||
config.discord.mute.supportGiveRoles :
|
||||
config.discord.mute.giveRoles)
|
||||
await member.roles.set(takenRoles);
|
||||
await member.roles.set(setRoles);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { EmbedBuilder, messageLink } from 'discord.js';
|
||||
|
||||
export default async function reportToLogs(config, client, action, message, { reason, expire, actionTo, actionBy }, msgChannel) {
|
||||
export default async function reportToLogs(config, client, action, message, { reason, expire, actionTo, actionBy }, interaction) {
|
||||
const channel = await client.channels.fetch(config.logs.channelId);
|
||||
const thread = await channel.threads.fetch(config.logs.threadId);
|
||||
|
||||
@@ -31,8 +31,8 @@ export default async function reportToLogs(config, client, action, message, { re
|
||||
|
||||
actionEmbed.setFields(fields);
|
||||
|
||||
if (msgChannel) {
|
||||
const msg = await msgChannel.send({ embeds: [actionEmbed] });
|
||||
if (interaction) {
|
||||
const msg = await interaction.editReply({ embeds: [actionEmbed] });
|
||||
reportToLogs(config, client, action, msg, { reason, expire, actionTo, actionBy });
|
||||
} else thread.send({ embeds: [actionEmbed] });
|
||||
}
|
||||
Reference in New Issue
Block a user