The manager of channels that belong to the client.

Example

new ChannelManager(client);

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

cache: CacheCollection<string, Channel>

This cache of the manager.

client: Client

Methods

  • Create a channel on Guilded.

    Returns

    The created channel.

    Example

    channels.create({ name: 'Chat', type: 'chat' });
    

    Parameters

    Returns Promise<Channel>

  • Delete a channel from Guilded.

    Example

    channels.delete(channel);
    

    Parameters

    • channel: string | Channel

      The channel to delete.

    Returns Promise<void>

  • Edit a channel on Guilded.

    Returns

    The edited channel.

    Example

    channels.edit(channel, { name: 'Chat' });
    

    Parameters

    Returns Promise<Channel>

  • Fetch a channel from Guilded, or cache.

    Returns

    The fetched channel.

    Example

    channels.fetch(channel);
    

    Parameters

    • channel: string | Channel

      The channel to fetch.

    • Optional options: FetchOptions

      The options to fetch the channel with.

    Returns Promise<Channel>

  • Set the maximum cache size of the manager.

    Returns

    The manager.

    Example

    manager.setMaxCache(100);
    

    Parameters

    • maxSize: number

      The maximum size of the cache.

    Returns ChannelManager