pokemon-showdown/server
Guangcong Luo 2e9328eada Support annotating chat commands
The nullable room refactor made it so there was no longer an easy way
to tell if a command could be used in PMs. This adds it back, as a
property on the handler function itself.

Now that we have properties on handler functions, I also added
`broadcastable` for whether or not the command is broadcastable.

It uses `Function#toString`, which is generally frowned-upon, but it's
well-specified and only happens during startup, so it shouldn't affect
performance after startup.

This also allows us not to need to repeat ourselves or give up
flexibility to have metadata about commands, which I think is worth the
tradeoff of reflection generally.
2020-07-13 00:55:23 -07:00
..
chat-commands Support annotating chat commands 2020-07-13 00:55:23 -07:00
chat-plugins Fix pollqueue page crash (#6986) 2020-07-09 22:19:43 -07:00
static
tournaments Fix tour challenges (#6972) 2020-07-06 22:58:12 -07:00
chat-formatter.ts
chat.ts Support annotating chat commands 2020-07-13 00:55:23 -07:00
config-loader.ts Refactor Auth.hasPermission 2020-07-13 00:55:23 -07:00
global-types.ts Refactor Auth.hasPermission 2020-07-13 00:55:23 -07:00
global-variables.d.ts
index.ts Separate Config.ofemain and Config.ofesockets 2020-06-12 22:02:32 -07:00
ip-tools.ts Update datacenters & ip-tools (#6903) 2020-06-22 07:18:40 -07:00
ladders-local.ts Update Streams API with pushEnd/writeEnd 2020-06-10 16:07:24 -07:00
ladders-remote.ts Add a library for utility functions (#6817) 2020-06-09 22:06:43 -07:00
ladders.ts Fix tour challenges (#6972) 2020-07-06 22:58:12 -07:00
loginserver.ts Fix memory leak in ladders-remote 2020-06-09 18:31:29 -07:00
monitor.ts
punishments.ts Server side changes to support persistent user settings and privacy changes (#6947) 2020-07-06 21:18:38 -07:00
room-battle.ts Add a library for utility functions (#6817) 2020-06-09 22:06:43 -07:00
room-game.ts "Remove" the global room (#6885) 2020-07-02 11:31:34 -07:00
roomlogs.ts Merge BasicChatRoom and BasicRoom 2020-07-02 18:54:02 -07:00
rooms.ts Server side changes to support persistent user settings and privacy changes (#6947) 2020-07-06 21:18:38 -07:00
sockets.ts "Remove" the global room (#6885) 2020-07-02 11:31:34 -07:00
team-validator-async.ts
user-groups.ts Refactor Auth.hasPermission 2020-07-13 00:55:23 -07:00
users.ts Refactor Auth.hasPermission 2020-07-13 00:55:23 -07:00
verifier.ts