class GuildsAPI

export 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

createSticker(
guildId: Snowflake
reason?: string
) : Promise<APISticker>

Creates a sticker for a guild

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

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

editMFALevel(
guildId: Snowflake
reason?: string
) : Promise<RESTPostAPIGuildsMFAJSONBody>

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

getActiveThreads(
guildId: Snowflake
) : Promise<APIThreadList>

Fetches the active threads in a guild

See also: https://discord.com/developers/docs/resources/guild#list-active-guild-threads

getAutoModerationRule(
guildId: Snowflake
ruleId: Snowflake
) : Promise<APIAutoModerationRule>

Fetches an auto moderation rule for a guild

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

getEmoji(
guildId: Snowflake
emojiId: Snowflake
) : Promise<APIEmoji>

Fetches an emoji for a guild

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

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

getSticker(
guildId: Snowflake
stickerId: Snowflake
) : Promise<APISticker>

Fetches a sticker for a guild

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

getWelcomeScreen(
guildId: Snowflake
) : Promise<APIGuildWelcomeScreen>

Fetches the welcome screen for a guild

See also: https://discord.com/developers/docs/resources/guild#get-guild-welcome-screen

getWidget(
guildId: Snowflake
) : Promise<APIGuildWidget>

Fetches the widget for a guild

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

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

syncTemplate(
guildId: Snowflake
templateCode: string
) : Promise<APITemplate>

Syncs a template for a guild

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

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