mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-12-28 08:55:38 -05:00
Add ability to disable raw gateway events
This commit is contained in:
parent
0e70dbb396
commit
14df879b6e
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user