1
0
forked from noxious/server

Improved folder structures for better maintainability

This commit is contained in:
2024-07-21 20:20:06 +02:00
parent 88820178cf
commit 62b9b4ec5c
50 changed files with 24 additions and 29 deletions

9
src/commands/alert.ts Normal file
View File

@ -0,0 +1,9 @@
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});
};