import { Server } from 'socket.io' type CommandInput = string[] export default class AlertCommand { constructor(private readonly io: Server) {} 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 }) } }