From 4280af2807af2ddd2d27c0365eb2c35f2408bb9f Mon Sep 17 00:00:00 2001 From: toast-ts <96593068+toast-ts@users.noreply.github.com> Date: Tue, 23 Jan 2024 09:15:40 +1100 Subject: [PATCH] Add ability to disable raw gateway events --- src/index.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/index.ts b/src/index.ts index 8b13228..55c5142 100644 --- a/src/index.ts +++ b/src/index.ts @@ -76,6 +76,10 @@ export let rawSwitches = { MESSAGE_UPDATE: false, MESSAGE_DELETE: false }; +if (!client.config.botSwitches.logs) { + rawSwitches.MESSAGE_DELETE = true; + rawSwitches.MESSAGE_UPDATE = true; +}; client.on('raw', async (packet:RawGatewayPacket)=>{ if (rawSwitches[packet.t]) return; if (packet.t !== 'MESSAGE_UPDATE') return;