The message router for the Guilded REST API.

Example

new MessageRouter(rest);

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

Methods

  • Create a message on Guilded.

    Returns

    The created message.

    Example

    messages.create('abc', 'Hello world!');
    

    Parameters

    Returns Promise<APIMessage>

  • Delete a message from Guilded.

    Example

    messages.delete('abc', 'abc');
    

    Parameters

    • channelId: string

      The ID of the channel the message belongs to.

    • messageId: string

      The ID of the message to delete.

    Returns Promise<void>

  • Edit a message on Guilded.

    Returns

    The edited message.

    Example

    messages.edit('abc', 'abc', 'Hello world!');
    

    Parameters

    • channelId: string

      The ID of the channel the message belongs to.

    • messageId: string

      The ID of the message to edit.

    • payload: APIMessageEditPayloadResolvable

      The payload of the message.

    Returns Promise<APIMessage>

  • Fetch a message from Guilded.

    Returns

    The fetched message.

    Example

    messages.fetch('abc', 'abc');
    

    Parameters

    • channelId: string

      The ID of the channel the message belongs to.

    • messageId: string

      The ID of the message to fetch.

    Returns Promise<APIMessage>

  • Fetch messages from Guilded.

    Returns

    The fetched messages.

    Example

    messages.fetch('abc');
    

    Parameters

    • channelId: string

      The ID of the channel the messages belong to.

    • Optional options: APIMessageFetchManyOptions

      The options to fetch messages with.

    Returns Promise<APIMessage[]>