Wolfringo Wolfringo
Wolfringo Wolfringo
Wolfringo (c) 2020 TehGM
DocFX, DiscordFX theme.
Search Results for

    Class ChatMessageExtensions

    Extensions for ChatMessage to be used by Commands System.

    Inheritance
    System.Object
    ChatMessageExtensions
    Namespace: TehGM.Wolfringo.Commands
    Assembly: Wolfringo.Commands.dll
    Syntax
    public static class ChatMessageExtensions

    Methods

    | Improve this Doc View Source

    GetMessageWithoutPrefix(ChatMessage, String, Boolean)

    Gets message text without prefix.

    Declaration
    public static string GetMessageWithoutPrefix(this ChatMessage message, string prefix, bool caseSensitive)
    Parameters
    Type Name Description
    ChatMessage message

    The received message.

    System.String prefix

    Prefix.

    System.Boolean caseSensitive

    Whether the check should be performed case-sensitively.

    Returns
    Type Description
    System.String

    The message with prefix stripped off.

    | Improve this Doc View Source

    GetMessageWithoutPrefix(ChatMessage, ICommandOptions)

    Gets message text without prefix.

    Declaration
    public static string GetMessageWithoutPrefix(this ChatMessage message, ICommandOptions options)
    Parameters
    Type Name Description
    ChatMessage message

    The received message.

    ICommandOptions options

    Commands options.

    Returns
    Type Description
    System.String

    The message with prefix stripped off.

    | Improve this Doc View Source

    MatchesPrefixRequirement(ChatMessage, String, PrefixRequirement, Boolean, out Int32)

    Checks if the message matches prefix requirements for command processing.

    Declaration
    public static bool MatchesPrefixRequirement(this ChatMessage message, string prefix, PrefixRequirement requirement, bool caseSensitive, out int startIndex)
    Parameters
    Type Name Description
    ChatMessage message

    Message to check.

    System.String prefix

    Prefix.

    PrefixRequirement requirement

    Prefix requirement to check.

    System.Boolean caseSensitive

    Whether the check should be performed case-sensitively.

    System.Int32 startIndex

    Index of start of actual command message, without prefix.

    Returns
    Type Description
    System.Boolean

    True if the message matches prefix requirement; otherwise false.

    | Improve this Doc View Source

    MatchesPrefixRequirement(ChatMessage, ICommandOptions, out Int32)

    Checks if the message matches prefix requirements for command processing.

    Declaration
    public static bool MatchesPrefixRequirement(this ChatMessage message, ICommandOptions options, out int startIndex)
    Parameters
    Type Name Description
    ChatMessage message

    Message to check.

    ICommandOptions options

    Commands options to perform the check with.

    System.Int32 startIndex

    Index of start of actual command message, without prefix.

    Returns
    Type Description
    System.Boolean

    True if the message matches prefix requirement; otherwise false.