Search Results for

    Show / Hide Table of Contents

    Class Formatter

    Inheritance
    Object
    Formatter
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: KSharpPlus
    Assembly: KSharpPlus.dll
    Syntax
    public static class Formatter

    Methods

    | Improve this Doc View Source

    BlockCode(String, String)

    Creates a block of code.

    Declaration
    public static string BlockCode(string content, string language = "")
    Parameters
    Type Name Description
    String content

    Contents of the block.

    String language

    Language to use for highlighting.

    Returns
    Type Description
    String

    Formatted block of code.

    | Improve this Doc View Source

    Bold(String)

    Creates bold text.

    Declaration
    public static string Bold(string content)
    Parameters
    Type Name Description
    String content

    Text to bolden.

    Returns
    Type Description
    String

    Formatted text.

    | Improve this Doc View Source

    EmbedlessUrl(Uri)

    Creates a URL that won't create a link preview.

    Declaration
    public static string EmbedlessUrl(Uri url)
    Parameters
    Type Name Description
    Uri url

    Url to prevent from being previewed.

    Returns
    Type Description
    String

    Formatted url.

    | Improve this Doc View Source

    InlineCode(String)

    Creates inline code snippet.

    Declaration
    public static string InlineCode(string content)
    Parameters
    Type Name Description
    String content

    Contents of the snippet.

    Returns
    Type Description
    String

    Formatted inline code snippet.

    | Improve this Doc View Source

    Italic(String)

    Creates italicized text.

    Declaration
    public static string Italic(string content)
    Parameters
    Type Name Description
    String content

    Text to italicize.

    Returns
    Type Description
    String

    Formatted text.

    | Improve this Doc View Source

    Mention(KuracordChannel)

    Creates a mention for specified channel.

    Declaration
    public static string Mention(KuracordChannel channel)
    Parameters
    Type Name Description
    KuracordChannel channel

    Channel to mention.

    Returns
    Type Description
    String

    Formatted mention.

    | Improve this Doc View Source

    Mention(KuracordRole)

    Creates a mention for specified role.

    Declaration
    public static string Mention(KuracordRole role)
    Parameters
    Type Name Description
    KuracordRole role

    Role to mention.

    Returns
    Type Description
    String

    Formatted mention.

    | Improve this Doc View Source

    Mention(KuracordUser, Boolean)

    Creates a mention for specified user or member. Can optionally specify to resolve nicknames.

    Declaration
    public static string Mention(KuracordUser user, bool nickname = false)
    Parameters
    Type Name Description
    KuracordUser user

    User to create mention for.

    Boolean nickname

    Whether the mention should resolve nicknames or not.

    Returns
    Type Description
    String

    Formatted mention.

    | Improve this Doc View Source

    Spoiler(String)

    Creates spoiler from text.

    Declaration
    public static string Spoiler(string content)
    Parameters
    Type Name Description
    String content

    Text to spoilerize.

    Returns
    Type Description
    String

    Formatted text.

    | Improve this Doc View Source

    Strike(String)

    Creates strikethrough text.

    Declaration
    public static string Strike(string content)
    Parameters
    Type Name Description
    String content

    Text to strikethrough.

    Returns
    Type Description
    String

    Formatted text.

    | Improve this Doc View Source

    Underline(String)

    Creates underlined text.

    Declaration
    public static string Underline(string content)
    Parameters
    Type Name Description
    String content

    Text to underline.

    Returns
    Type Description
    String

    Formatted text.

    • Improve this Doc
    • View Source
    In This Article
    Back to top © 2023 KSharpPlus Contributors