diff options
author | WlodekM <[email protected]> | 2024-11-30 12:21:57 +0200 |
---|---|---|
committer | WlodekM <[email protected]> | 2024-11-30 12:21:57 +0200 |
commit | f37e3537adb59f2b724259a1720295756eb94277 (patch) | |
tree | a0f9c379ecdeb575d826b99442ec4df49b5137be /commands.ts | |
parent | 6cb6085e508b3b72697924490bad517546bdec71 (diff) |
fix /users
Diffstat (limited to 'commands.ts')
-rw-r--r-- | commands.ts | 6 |
1 files 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<string>(([_, usr]) => ` * ${usr.name()}`) .join("\n")}` ); }, |