Options
All
  • Public
  • Public/Protected
  • All
Menu

Class GuildManager

Manages API methods for Guilds

Hierarchy

  • GuildManager

Index

Constructors

Properties

client: Client

The client that instantiated this Manager

Accessors

  • All of the guilds the client is currently handling, mapped by their Ids

    Returns LimitedCollection<string, Guild>

Methods

  • edit(guildId: string, options: Partial<Guild>, reason?: string): Promise<Guild>
  • Edits a Guild

    example
    client.guilds.edit('123456789123456', { name: 'My amazing community!'});
    

    Parameters

    • guildId: string

      The Id of the guild

    • options: Partial<Guild>

      The options to edit the guild with

    • reason: string = ''

      The reason to edit the guild

    Returns Promise<Guild>

  • Obtains one or multiple guilds from Discord, or the guild cache if it's already available

    Returns Promise<Collection<string, Guild>>

  • Parameters

    • Optional id: string

    Returns Promise<Guild>

  • leave(id: string): Promise<undefined>
  • Leaves a guild

    Parameters

    • id: string

    Returns Promise<undefined>

  • Edits a guild's widget settings

    Parameters

    • guildId: string
    • settings: GuildWidgetSettingsData

      The widget settings for the guild

    • reason: string = ''

      Reason for changing the guild's widget settings

    Returns Promise<null>

Generated using TypeDoc version 0.22.16, the 9/16/2022 at 1:09:15 AM