Skip to main content

SetRepeatedChatBlockMessage

public void SetRepeatedChatBlockMessage(out ErrorInfo errorInfo);

Parameter

ValueTypeDescriptiondefault
messagestringNotice messageYou are banned from chatting for some time to prevent spamming.

Description

When you input more than a certain number of times within the certain time set in the console, entering chat messages is restricted for a certain period of time, and an error is returned from each handler when a chat is entered.
When a spam prevention error occurs, the message to be returned is set.

  • The message count is collected from both guild and public channels.
  • When making an entry is banned in one channel, all other channels will be applied with the restriction as well.

The set message can be checked at the ErrorInfo of args in the handler below.

Backend.Chat.OnChat = (ChatEventArgs args) => {}
Backend.Chat.OnGuildChat = (ChatEventArgs args) => {}
Backend.Chat.OnWhisper = (WhisperEventArgs args) => {}

Example

Backend.Chat.SetRepeatedChatBlockMessage("Please do not spam.");