class GuildsAPI

declare class GuildsAPI

Constructors

constructor(
rest: REST
)

Constructs a new instance of the GuildsAPI class

addRoleToMember(
guildId: Snowflake
userId: Snowflake
roleId: Snowflake
reason?: string
) : Promise<void>

Adds a role to a guild member

See also: https://discord.com/developers/docs/resources/guild#add-guild-member-role

banUser(
guildId: Snowflake
userId: Snowflake
reason?: string
) : Promise<void>

Bans a user from a guild

See also: https://discord.com/developers/docs/resources/guild#create-guild-ban

delete(
guildId: Snowflake
reason?: string
) : Promise<void>

Deletes a guild

See also: https://discord.com/developers/docs/resources/guild#delete-guild

deleteAutoModerationRule(
guildId: Snowflake
ruleId: Snowflake
reason?: string
) : Promise<void>

Deletes an auto moderation rule for a guild

See also: https://discord.com/developers/docs/resources/auto-moderation#delete-auto-moderation-rule

deleteEmoji(
guildId: Snowflake
emojiId: Snowflake
reason?: string
) : Promise<void>

Deletes an emoji for a guild

See also: https://discord.com/developers/docs/resources/emoji#delete-guild-emoji

deleteIntegration(
guildId: Snowflake
integrationId: Snowflake
reason?: string
) : Promise<void>

Deletes an integration from a guild

See also: https://discord.com/developers/docs/resources/guild#delete-guild-integration

deleteRole(
guildId: Snowflake
roleId: Snowflake
reason?: string
) : Promise<void>

Deletes a guild role

See also: https://discord.com/developers/docs/resources/guild#delete-guild-role

deleteScheduledEvent(
guildId: Snowflake
eventId: Snowflake
reason?: string
) : Promise<void>

Deletes a scheduled event for a guild

See also: https://discord.com/developers/docs/resources/guild-scheduled-event#delete-guild-scheduled-event

deleteSticker(
guildId: Snowflake
stickerId: Snowflake
reason?: string
) : Promise<void>

Deletes a sticker for a guild

See also: https://discord.com/developers/docs/resources/sticker#delete-guild-sticker

deleteTemplate(
guildId: Snowflake
templateCode: string
) : Promise<void>

Deletes a template for a guild

See also: https://discord.com/developers/docs/resources/guild-template#delete-guild-template

Edits the multi-factor-authentication (MFA) level of a guild

See also: https://discord.com/developers/docs/resources/guild#modify-guild-mfa-level

editUserVoiceState() : Promise<void>

Edits a user's voice state in a guild

See also: https://discord.com/developers/docs/resources/guild#modify-user-voice-state

Fetch the number of members that can be pruned from a guild

See also: https://discord.com/developers/docs/resources/guild#get-guild-prune-count

getWidgetImage(
guildId: Snowflake
) : Promise<ArrayBuffer>

Fetches the widget image for a guild

See also: https://discord.com/developers/docs/resources/guild#get-guild-widget-image

getWidgetSettings(
guildId: Snowflake
) : Promise<ArrayBuffer>

Fetches the widget settings for a guild

See also: https://discord.com/developers/docs/resources/guild#get-guild-widget-settings

removeRoleFromMember(
guildId: Snowflake
userId: Snowflake
roleId: Snowflake
reason?: string
) : Promise<void>

Removes a role from a guild member

See also: https://discord.com/developers/docs/resources/guild#remove-guild-member-role

setChannelPositions() : Promise<void>

Edits a guild channel's positions

See also: https://discord.com/developers/docs/resources/guild#modify-guild-channel-positions

unbanUser(
guildId: Snowflake
userId: Snowflake
reason?: string
) : Promise<void>

Unbans a user from a guild

See also: https://discord.com/developers/docs/resources/guild#remove-guild-ban