slight fix

This commit is contained in:
MathMan05 authored and Rory& committed 2025-11-25 17:35:13 +01:00
1 parent baf605f949
commit 2a9d3ff78c
1 file changed
+2 -1
+2 -1
View File
@@ -76,7 +76,8 @@ export async function handleMessage(opts: MessageOptions): Promise<Message> {
console.log(limit, lastMsgTime && +lastMsgTime - (Date.now() - limit * 1000));
if (lastMsgTime && Date.now() - limit * 1000 < +lastMsgTime) {
permission ||= await getPermission(opts.author_id, channel.guild_id, channel);
if (!permission.has("MANAGE_MESSAGES") && !permission.has("MANAGE_CHANNELS")) {
//FIXME MANAGE_MESSAGES and MANAGE_CHANNELS will need to be removed once they're gone as checks
if (!permission.has("MANAGE_MESSAGES") && !permission.has("MANAGE_CHANNELS") && !permission.has("BYPASS_SLOWMODE")) {
throw DiscordApiErrors.SLOWMODE_RATE_LIMIT;
}
}