Options
All
  • Public
  • Public/Protected
  • All
Menu

Class GuildTemplateMethods

Methods for interacting with Guild Templates

Hierarchy

  • GuildTemplateMethods

Index

Constructors

  • Create a new Guild Template Method Handler

    Usually SnowTransfer creates a method handler for you, this is here for completion

    You can access the methods listed via client.guildTemplate.method, where client is an initialized SnowTransfer instance

    Parameters

    Returns <internal>.GuildTemplateMethods

Properties

requestHandler: <internal>.RequestHandler

Methods

  • Creates a guild from a template. If using a bot account, the bot can only be in < 10 guilds (guild create limitation)

    example

    const client = new SnowTransfer("TOKEN") const guild = await client.guildTemplate.createGuildFromGuildTemplate("code", { name: "Cool guild" })

    Parameters

    • code: string

      The code of the template

    • options: { icon?: null | string; name: string }

      Specific options for the new guild

      • Optional icon?: null | string
      • name: string

    Returns Promise<<internal>."/home/runner/work/avocord/avocord/node_modules/discord-typings/Resources/Guild".Guild>

  • Creates a template from the current state of the guild

    example

    const client = new SnowTransfer("TOKEN") const template = await client.guildTemplate.createGuildTemplate("guildId", { name: "Cool guild template", description: "This is a cool guild template" })

    Parameters

    • guildId: string

      The Id of the guild

    • data: { description?: null | string; name: string }

      Metadata for the template

      • Optional description?: null | string
      • name: string

    Returns Promise<<internal>.GuildTemplate>

    A guild tempalte

    Permissions needed Condition
    MANAGE_GUILD always
  • Deletes a template from a guild

    example

    const client = new SnowTransfer("TOKEN") const template = await client.guildTemplate.deleteGuildTemplate("guildId", "code")

    Parameters

    • guildId: string

      The Id of the guild

    • code: string

      The code of the template

    Returns Promise<<internal>.GuildTemplate>

    A guild template

    Permissions needed Condition
    MANAGE_GUILD always
  • Get a guild template by code

    example

    const client = new SnowTransfer("TOKEN") const template = await client.guildTemplate.getGuildTemplate("code")

    Parameters

    • code: string

      The code for the template

    Returns Promise<<internal>.GuildTemplate>

  • Gets all templates from a guild

    example

    const client = new SnowTransfer("TOKEN") const templates = await client.guildTemplate.getGuildTemplates("guildId")

    Parameters

    • guildId: string

      The Id of the guild

    Returns Promise<<internal>.GuildTemplate[]>

    An array of guild templates

    Permissions needed Condition
    MANAGE_GUILD always
  • Updates a guild template's metadata

    example

    const client = new SnowTransfer("TOKEN") const template = await client.guildTemplate.modifyGuildTemplate("guildId", "code", { name: "Coolest guild template", description: "This is the coolest guild template hands down" })

    Parameters

    • guildId: string

      The Id of the guild

    • code: string

      The code of the template

    • data: { description?: null | string; name?: string }

      Metadata for the template

      • Optional description?: null | string
      • Optional name?: string

    Returns Promise<<internal>.GuildTemplate>

    A guild template

    Permissions needed Condition
    MANAGE_GUILD always
  • Updates a guild template to match the current state of the guild

    example

    const client = new SnowTransfer("TOKEN") const template = await client.guildTemplate.syncGuildTemplate("guildId", "code")

    Parameters

    • guildId: string

      The Id of the guild

    • code: string

      The code of the template

    Returns Promise<<internal>.GuildTemplate>

    A guild template

    Permissions needed Condition
    MANAGE_GUILD always

Generated using TypeDoc