ChatClient/ChatClient.cs
/// <summary>
/// Enables slow mode for the specified time.
/// </summary>
/// <param name="seconds">The amount of time in seconds; default: 60.</param>
/// <param name="channelName">The name of the channel; default: sole connected channel.</param>
/// <returns>False if error.</returns>
Enables slow mode for the specified time.
Enables slow mode for the specified time .
public bool EnableSlowMode(int seconds = 60, string? channelName = null) {
            if (seconds <= 0 || seconds > int.MaxValue) {
                LogLine($"Invalid {nameof(seconds)}", LogLevel.Warn);
                return false;
            }
            channelName = GetValidChannelName(channelName);
            if (string.IsNullOrEmpty(channelName)) {
                LogLine($"null/empty {nameof(channelName)}", LogLevel.Error);
                return false;
            }
            if (!SendMessage($"/slow {seconds}")) {
                LogLine($"Failed to enable slow mode: {seconds}", LogLevel.Error);
                return false;
            }
            LogLine($"Enabled slow mode: {seconds}", LogLevel.Info);
            return true;
        }
public bool EnableSlowMode ( int seconds = 60 , string ? channelName = null ) { if ( seconds <= 0 || seconds > int . MaxValue ) { LogLine ( $" Invalid  { nameof ( seconds ) } " , LogLevel . Warn ) ; return false ; } channelName = GetValidChannelName ( channelName ) ; if ( string . IsNullOrEmpty ( channelName ) ) { LogLine ( $" null/empty  { nameof ( channelName ) } " , LogLevel . Error ) ; return false ; } if ( ! SendMessage ( $" /slow  { seconds } " ) ) { LogLine ( $" Failed to enable slow mode:  { seconds } " , LogLevel . Error ) ; return false ; } LogLine ( $" Enabled slow mode:  { seconds } " , LogLevel . Info ) ; return true ; }
Enables slow mode for the specified time.
Enables slow mode for the specified time .
False if error.
False if error .
seconds
int
The amount of time in seconds; default: 60.
The amount of time in seconds ; default : 60 .
channelName
string?
The name of the channel; default: sole connected channel.
The name of the channel ; default : sole connected channel .