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:
parent
b8c760121b
commit
4280af2807
@ -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<RawMessageUpdate>)=>{
|
||||
if (rawSwitches[packet.t]) return;
|
||||
if (packet.t !== 'MESSAGE_UPDATE') return;
|
||||
|
Loading…
Reference in New Issue
Block a user