1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-11-17 20:30:58 -05:00

Add ability to disable raw gateway events

This commit is contained in:
toast-ts 2024-01-23 09:15:40 +11:00
parent b8c760121b
commit 4280af2807

View File

@ -76,6 +76,10 @@ export let rawSwitches = {
MESSAGE_UPDATE: false, MESSAGE_UPDATE: false,
MESSAGE_DELETE: false MESSAGE_DELETE: false
}; };
if (!client.config.botSwitches.logs) {
rawSwitches.MESSAGE_DELETE = true;
rawSwitches.MESSAGE_UPDATE = true;
};
client.on('raw', async (packet:RawGatewayPacket<RawMessageUpdate>)=>{ client.on('raw', async (packet:RawGatewayPacket<RawMessageUpdate>)=>{
if (rawSwitches[packet.t]) return; if (rawSwitches[packet.t]) return;
if (packet.t !== 'MESSAGE_UPDATE') return; if (packet.t !== 'MESSAGE_UPDATE') return;