Class ForumTopicContext

Hierarchy

Constructors

Properties

Accessors

Methods

Constructors

Properties

_client: Evogram
_source: Object
isGeneral: boolean = ...

True, if the topic is General (only for MessageContext)

Accessors

  • get icon(): {
        color: undefined | string;
        emojiID: undefined | string;
    }
  • Gets the icon of the forum topic.

    Returns {
        color: undefined | string;
        emojiID: undefined | string;
    }

    • color: undefined | string
    • emojiID: undefined | string

Methods

  • Edits the forum topic.

    Throws

    • If the topic is General and has a mandatory name parameter for editing but it is missing.

    Parameters

    Returns Promise<true>

  • Converts the source object to a context object of a given type.

    Example

    client.updates.on("message", message => {
    const user = message.user.toContext<CustomUserContext>();
    // Now user works correctly with your context
    })

    Type Parameters

    • TContext extends object

      Generic type parameter for the context object.

    Returns TContext

    The context object.

Generated using TypeDoc