mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-05-24 08:46:26 -05:00
Slowchat: Don't announce when the setting changes
This commit is contained in:
parent
f77d8d6baa
commit
df1b799d2e
|
|
@ -410,14 +410,12 @@ exports.commands = {
|
|||
if (this.meansNo(target)) {
|
||||
if (!room.slowchat) return this.errorReply(`Slow chat is already disabled in this room.`);
|
||||
room.slowchat = false;
|
||||
this.add("|raw|<div class=\"broadcast-blue\"><strong>Slow chat was disabled!</strong><br />There is no longer a set minimum time between messages.</div>");
|
||||
} else if (targetInt) {
|
||||
if (!user.can('bypassall') && room.userCount < SLOWCHAT_USER_REQUIREMENT) return this.errorReply(`This room must have at least ${SLOWCHAT_USER_REQUIREMENT} users to set slowchat; it only has ${room.userCount} right now.`);
|
||||
if (room.slowchat === targetInt) return this.errorReply(`Slow chat is already set to ${room.slowchat} seconds in this room.`);
|
||||
if (targetInt < SLOWCHAT_MINIMUM) targetInt = SLOWCHAT_MINIMUM;
|
||||
if (targetInt > SLOWCHAT_MAXIMUM) targetInt = SLOWCHAT_MAXIMUM;
|
||||
room.slowchat = targetInt;
|
||||
this.add(`|raw|<div class="broadcast-red"><strong>Slow chat was enabled!</strong><br />Messages must have at least ${room.slowchat} seconds between them.</div>`);
|
||||
} else {
|
||||
return this.parse("/help slowchat");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user