From f37e3537adb59f2b724259a1720295756eb94277 Mon Sep 17 00:00:00 2001 From: WlodekM Date: Sat, 30 Nov 2024 12:21:57 +0200 Subject: fix /users --- commands.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/commands.ts b/commands.ts index 8a93c8a..fbde383 100644 --- a/commands.ts +++ b/commands.ts @@ -87,9 +87,9 @@ export const commands: {[key: string]: Command} = { aliases: [], command({ user, server, args }) { user.socket.send( - `Users${args[0] != "global" ? ` in ${user.channel}` : ""}:\n${Object.values(server.users) - .filter((usr) => usr.channel == user.channel || args[0] == "global") - .map((usr) => ` * ${usr.name()}`) + `Users${args[0] != "global" ? ` in ${user.channel}` : ""}:\n${[...server.users.entries()] + .filter(([_, usr]) => usr.channel == user.channel || args[0] == "global") + .map(([_, usr]) => ` * ${usr.name()}`) .join("\n")}` ); }, -- cgit 1.4.1-2-gfad0