summary refs log tree commit diff
path: root/src/api
diff options
context:
space:
mode:
authorMathMan05 <mathmanrm@gmail.com>2025-11-25 10:33:52 -0600
committerRory& <root@rory.gay>2025-11-25 17:35:13 +0100
commit2a9d3ff78ce6f32c121c9c850f12a2a733082dad (patch)
tree50ab7d83dde1683e91b06dba2c81579e0210981c /src/api
parentImplement Slowmode (diff)
downloadserver-ts-2a9d3ff78ce6f32c121c9c850f12a2a733082dad.tar.xz
slight fix
Diffstat (limited to 'src/api')
-rw-r--r--src/api/util/handlers/Message.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/api/util/handlers/Message.ts b/src/api/util/handlers/Message.ts

index bdac041d..2294e702 100644 --- a/src/api/util/handlers/Message.ts +++ b/src/api/util/handlers/Message.ts
@@ -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; } }