forked from noxious/server
10 lines
284 B
TypeScript
10 lines
284 B
TypeScript
import { Server } from 'socket.io'
|
|
|
|
type CommandInput = string[]
|
|
|
|
export default function (input: CommandInput, io: Server) {
|
|
const message: string = input.join(' ') ?? null
|
|
if (!message) return console.log('message is required')
|
|
io.emit('notification', { message: message })
|
|
}
|