mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-05-21 14:59:50 -05:00
Chat: Inform locked users to use / commands when broadcasting
This commit is contained in:
parent
8ef8765a87
commit
a86bd3bbd7
|
|
@ -1011,6 +1011,11 @@ export class CommandContext extends MessageContext {
|
|||
return true;
|
||||
}
|
||||
|
||||
if (this.user.locked && !(this.room?.roomid.startsWith('help-') || this.pmTarget?.can('lock'))) {
|
||||
this.errorReply(`You cannot broadcast this command's information while locked.`);
|
||||
throw new Chat.ErrorMessage(`To see it for yourself, use: /${this.message.slice(1)}`);
|
||||
}
|
||||
|
||||
if (this.room && !this.user.can('show', null, this.room)) {
|
||||
this.errorReply(`You need to be voiced to broadcast this command's information.`);
|
||||
throw new Chat.ErrorMessage(`To see it for yourself, use: /${this.message.slice(1)}`);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user