mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-05-18 19:28:35 -05:00
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. |
||
|---|---|---|
| .. | ||
| chat-commands | ||
| chat-plugins | ||
| static | ||
| tournaments | ||
| chat-formatter.ts | ||
| chat.ts | ||
| config-loader.ts | ||
| global-types.ts | ||
| global-variables.d.ts | ||
| index.ts | ||
| ip-tools.ts | ||
| ladders-local.ts | ||
| ladders-remote.ts | ||
| ladders.ts | ||
| loginserver.ts | ||
| monitor.ts | ||
| punishments.ts | ||
| room-battle.ts | ||
| room-game.ts | ||
| roomlogs.ts | ||
| rooms.ts | ||
| sockets.ts | ||
| team-validator-async.ts | ||
| user-groups.ts | ||
| users.ts | ||
| verifier.ts | ||