Skip to content

DiscordGuild

The DiscordGuild class represents a Discord guild (server) and provides methods to interact with and manage the guild.

Properties

shardId

DiscordGuild.shardId  :: number

id

DiscordGuild.id  :: string

name

DiscordGuild.name  :: string

icon

DiscordGuild.icon  :: string?

iconHash

DiscordGuild.iconHash  :: string?

splash

DiscordGuild.splash  :: string?

discoverySplash

DiscordGuild.discoverySplash  :: string?

owner

DiscordGuild.owner  :: boolean

ownerId

DiscordGuild.ownerId  :: string

permissions

DiscordGuild.permissions  :: number

afkChannelId

DiscordGuild.afkChannelId  :: string?

afkTimeout

DiscordGuild.afkTimeout  :: number

widgetEnabled

DiscordGuild.widgetEnabled  :: boolean

widgetChannelId

DiscordGuild.widgetChannelId  :: string?

verificationLevel

DiscordGuild.verificationLevel  :: number

defaultMessageNotifications

DiscordGuild.defaultMessageNotifications  :: number

explicitContentFilter

DiscordGuild.explicitContentFilter  :: number

roles

DiscordGuild.roles  :: { Objects.DiscordGuildRole }

emojis

DiscordGuild.emojis  :: { Objects.DiscordEmoji }

features

DiscordGuild.features  :: { string }

mfaLevel

DiscordGuild.mfaLevel  :: number

applicationId

DiscordGuild.applicationId  :: string?

systemChannelId

DiscordGuild.systemChannelId  :: string?

systemChannelFlags

DiscordGuild.systemChannelFlags  :: number

rulesChannelId

DiscordGuild.rulesChannelId  :: string?

maxPresences

DiscordGuild.maxPresences  :: number?

maxMembers

DiscordGuild.maxMembers  :: number

vanityUrlCode

DiscordGuild.vanityUrlCode  :: string?

description

DiscordGuild.description  :: string?
DiscordGuild.banner  :: string?

premiumTier

DiscordGuild.premiumTier  :: number

premiumSubscriptionCount

DiscordGuild.premiumSubscriptionCount  :: number

preferredLocale

DiscordGuild.preferredLocale  :: string

publicUpdatesChannelId

DiscordGuild.publicUpdatesChannelId  :: string?

maxVideoChannelUsers

DiscordGuild.maxVideoChannelUsers  :: number

maxStageVideoChannelUsers

DiscordGuild.maxStageVideoChannelUsers  :: number

approximateMemberCount

DiscordGuild.approximateMemberCount  :: number

approximatePresenceCount

DiscordGuild.approximatePresenceCount  :: number

welcomeScreen

DiscordGuild.welcomeScreen  :: Objects.GuildWelcomeScreen?

nsfwLevel

DiscordGuild.nsfwLevel  :: number

stickers

DiscordGuild.stickers  :: { Objects.DiscordSticker }

premiumProgressBarEnabled

DiscordGuild.premiumProgressBarEnabled  :: boolean

safetyAlertsChannelId

DiscordGuild.safetyAlertsChannelId  :: string?

type

DiscordGuild.type  :: string

The type of the DiscordGuild. Default is “DiscordGuild”.

Methods

createSlashCommandAsync

DiscordGuild : createSlashCommandAsync (

     command: CommandBuilder
)  -> Vendor.Future

Creates a new slash command in the guild asynchronously.

deleteSlashCommandAsync

DiscordGuild : deleteSlashCommandAsync (

     commandId: string
)  -> Vendor.Future

Deletes a slash command in the guild asynchronously.

editSlashCommandAsync

DiscordGuild : editSlashCommandAsync (

     commandId: string
     command: CommandBuilder
)  -> Vendor.Future

Edits a slash command in the guild asynchronously.

fetchSlashCommandsAsync

DiscordGuild : fetchSlashCommandsAsync ()  -> Vendor.Future

Fetches all slash commands in the guild asynchronously.

fetchGuildChannels

DiscordGuild : fetchGuildChannels ()  -> Vendor.Future

Fetches all channels in the guild asynchronously.

setSlashCommandsAsync

DiscordGuild : setSlashCommandsAsync (

     commands: {CommandBuilder}
)  -> Vendor.Future

Sets multiple slash commands in the guild asynchronously.

getGuildAuditLogs

DiscordGuild : getGuildAuditLogs ()  -> Vendor.Future

Gets the audit logs of the guild asynchronously.

modifyAsync

DiscordGuild : modifyAsync (

     guildBuilder: Builders.GuildBuilder
)  -> Vendor.Future

Modifies the guild settings asynchronously.

modifyCurrentMemberAsync

DiscordGuild : modifyCurrentMemberAsync (

     memberBuilder: Builders.MemberBuilder
)  -> Vendor.Future

Modifies the current member of the discord guild

deleteAsync

DiscordGuild : deleteAsync ()  -> Vendor.Future

Deletes the guild asynchronously.

getChannelsAsync

DiscordGuild : getChannelsAsync ()  -> Vendor.Future

Gets all channels in the guild asynchronously.

getMemberAsync

DiscordGuild : getMemberAsync (

     userId: string
)  -> Vendor.Future

Gets a specific member of the guild asynchronously.

fetchGuildMembersAsync

DiscordGuild : fetchGuildMembersAsync (

     limit: number
     lastUserId: number?
)  -> Vendor.Future

Fetches members of the guild asynchronously.

searchGuildMembersAsync

DiscordGuild : searchGuildMembersAsync (

     query: string
     limit: number?
)  -> Vendor.Future

Searches for members in the guild asynchronously.

listAutomoderationRulesAsync

DiscordGuild : listAutomoderationRulesAsync ()  -> Vendor.Future

Lists all automoderation rules in the guild asynchronously.

getAutomoderationRuleAsync

DiscordGuild : getAutomoderationRuleAsync (

     ruleId: string
)  -> Vendor.Future

Gets a specific automoderation rule in the guild asynchronously.

createAutomoderationRuleAsync

DiscordGuild : createAutomoderationRuleAsync (

     getAutomoderationRuleBuilder: AutomoderationRuleBuilder
)  -> Vendor.Future

Creates an automoderation rule in the guild asynchronously.

getPreviewAsync

DiscordGuild : getPreviewAsync ()  -> Vendor.Future<Objects.GuildPreview>

Get the preview of the current Guild

createChannelAsync

DiscordGuild : createChannelAsync (

     channelBuilder: Builders.ChannelBuilder
)  -> Vendor.Future<Objects.DiscordChannel>

Creates a Guild Channel under a Guild.

getActiveGuildThreads

DiscordGuild : getActiveGuildThreads ()  -> Vendor.Future<{ Objects.DiscordChannel }>

Fetches all active guild threads.

addMemberAsync

DiscordGuild : addMemberAsync (

     userId: string
     accessToken: string
)  -> Vendor.Future<{ Objects.DiscordChannel }>

Adds a discordian to a guild.

getGuildBansAsync

DiscordGuild : getGuildBansAsync (

     limit: number?
     before: string?
     after: string?
)  -> Vendor.Future<{ Objects.DiscordGuildBan }>

Fetches an array of Guild Bans

getGuildBanAsync

DiscordGuild : getGuildBanAsync (

     userId: string
)  -> Vendor.Future<Objects.DiscordGuildBan?>

Fetches the ban object for a specific user id

bulkGuildBanAsync

DiscordGuild : bulkGuildBanAsync (

     userIds: { string }
)  -> Vendor.Future

Bans up to 200 members asynchronously

bulkGuildBanAsync

DiscordGuild : bulkGuildBanAsync ()  -> Vendor.Future<{ Objects.DiscordGuildRole }>

Allows you to get all roles within a guild.

bulkGuildBanAsync

DiscordGuild : bulkGuildBanAsync ()  -> Vendor.Future<{ Objects.DiscordGuildRole }>

Allows you to get all roles within a guild.

setMFALevelAsync

DiscordGuild : setMFALevelAsync (

     mfaLevel: number
)  -> Vendor.Future

Setst he guilds MFA level.

getPruneCountAsync

DiscordGuild : getPruneCountAsync (

     days: number?
     includedRoles: { string }?
)  -> Vendor.Future<{ pruned: number }>

Fetches the prune count.

getPruneCountAsync

DiscordGuild : getPruneCountAsync (

     days: number?
     computePruneCount: boolean?
     includeRoles: { string }?
)  -> Vendor.Future<{ pruned: number }>

Requests discord to prune the Discord guild.

getGuildVoiceRegionsAsync

Fetches the available voice regions for the guild.

getGuildInvitesAsync

DiscordGuild : getGuildInvitesAsync ()  -> Vendor.Future<{ Objects.DiscordInvite }>

Fetches all guild invite objects.

getGuildIntegrationsAsync

DiscordGuild : getGuildIntegrationsAsync ()  -> Vendor.Future<{ Objects.DiscordIntegration }>

Fetches all guild integrations

getGuildWidgetSettingsAsync

DiscordGuild : getGuildWidgetSettingsAsync ()  -> Vendor.Future<{ enabled: boolean, cannelId: string }>

Fetches the widget settings for the current guild.

updateGuildWidgetSettingsAsync

DiscordGuild : updateGuildWidgetSettingsAsync (

     widgetEnabled: boolean
     channelId: string
)  -> Vendor.Future<{ enabled: boolean, cannelId: string }>

Updates the widget settings for the current guild

getGuldWidgetAsync

DiscordGuild : getGuldWidgetAsync ()  -> Vendor.Future<Objects.GuildWidget>

Gets the guild widget for this guild.

getGuildVanityUrlAsync

DiscordGuild : getGuildVanityUrlAsync ()  -> Vendor.Future<{ code: string, uses: number }>

Gets the vanity url for this guild.

getGuildWelcomeScreenAsync

DiscordGuild : getGuildWelcomeScreenAsync ()  -> Vendor.Future<Objects.GuildWelcomeScreen>

Gets the guild welcome screen for this guild.

getGuildWidgetImageAsync

DiscordGuild : getGuildWidgetImageAsync (

     style: 'shield'
                      | 'banner1'
                      | 'banner2'
                      | 'banner3'
                      | 'banner4'
)  -> Vendor.Future<string>

Gets the binary PNG image for a server widget

modifyGuildWelcomeScreenAsync

DiscordGuild : modifyGuildWelcomeScreenAsync (

     welcomeScreenBuilder: Builders.WelcomeScreenBuilder
)  -> Vendor.Future

Updates the guild welcome screen for this guild.

getGuldOnboardingAsync

DiscordGuild : getGuldOnboardingAsync ()  -> Vendor.Future<Objects.GuildOnboarding>

Gets the onboarding for this guild

getGuldOnboardingAsync

DiscordGuild : getGuldOnboardingAsync (

     guildOnboardingBuilder: Builders.OnboardingBuilder
)  -> Vendor.Future<Objects.GuildOnboarding>

Updates the onboarding for this guild

Functions

new

DiscordGuild . new (

     discordClient: any
     guildData: table
)  -> ()

Creates a new DiscordGuild instance.