Replaced all event names with numbers for less bandwidth usage

This commit is contained in:
2025-02-11 23:12:41 +01:00
parent 8b51f6e16a
commit 9e55ac7990
57 changed files with 193 additions and 98 deletions

View File

@ -1,3 +1,4 @@
import { SocketEvent } from '#application/enums';
import { Server } from 'socket.io'
import { BaseCommand } from '#application/base/baseCommand'
@ -8,6 +9,6 @@ export default class AlertCommand extends BaseCommand {
public execute(input: CommandInput): void {
const message: string = input.join(' ') ?? null
if (!message) return console.log('message is required')
this.io.emit('notification', { message: message })
this.io.emit(SocketEvent.NOTIFICATION, { message: message })
}
}

View File

@ -1,4 +1,4 @@
import fs from 'fs'
wimport fs from 'fs'
import sharp from 'sharp'