DiscordGuild
The DiscordGuild
class represents a Discord guild (server) and provides methods to interact with and manage the guild.
Properties
shardId
id
name
icon
iconHash
splash
discoverySplash
owner
ownerId
permissions
afkChannelId
afkTimeout
widgetEnabled
widgetChannelId
verificationLevel
defaultMessageNotifications
explicitContentFilter
roles
emojis
features
mfaLevel
applicationId
systemChannelId
systemChannelFlags
rulesChannelId
maxPresences
maxMembers
vanityUrlCode
description
banner
premiumTier
premiumSubscriptionCount
preferredLocale
publicUpdatesChannelId
maxVideoChannelUsers
maxStageVideoChannelUsers
approximateMemberCount
approximatePresenceCount
welcomeScreen
nsfwLevel
stickers
premiumProgressBarEnabled
safetyAlertsChannelId
type
The type of the DiscordGuild. Default is “DiscordGuild”.
Methods
createSlashCommandAsync
DiscordGuild : createSlashCommandAsync () -> Vendor.Future
command: CommandBuilder
Creates a new slash command in the guild asynchronously.
deleteSlashCommandAsync
DiscordGuild : deleteSlashCommandAsync () -> Vendor.Future
commandId: string
Deletes a slash command in the guild asynchronously.
editSlashCommandAsync
DiscordGuild : editSlashCommandAsync () -> Vendor.Future
commandId: string
command: CommandBuilder
Edits a slash command in the guild asynchronously.
fetchSlashCommandsAsync
DiscordGuild : fetchSlashCommandsAsync () -> Vendor.Future
Fetches all slash commands in the guild asynchronously.
fetchGuildChannelsAsync
DiscordGuild : fetchGuildChannelsAsync () -> Vendor.Future
Fetches all channels in the guild asynchronously.
setSlashCommandsAsync
Sets multiple slash commands in the guild asynchronously.
getGuildAuditLogs
DiscordGuild : getGuildAuditLogs () -> Vendor.Future
Gets the audit logs of the guild asynchronously.
modifyAsync
DiscordGuild : modifyAsync () -> Vendor.Future
guildBuilder: Builders.GuildBuilder
Modifies the guild settings asynchronously.
modifyCurrentMemberAsync
DiscordGuild : modifyCurrentMemberAsync () -> Vendor.Future
memberBuilder: Builders.MemberBuilder
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 () -> Vendor.Future
userId: string
Gets a specific member of the guild asynchronously.
fetchGuildMembersAsync
DiscordGuild : fetchGuildMembersAsync () -> Vendor.Future
limit: number
lastUserId: number?
Fetches members of the guild asynchronously.
searchGuildMembersAsync
DiscordGuild : searchGuildMembersAsync () -> Vendor.Future
query: string
limit: number?
Searches for members in the guild asynchronously.
listAutomoderationRulesAsync
DiscordGuild : listAutomoderationRulesAsync () -> Vendor.Future
Lists all automoderation rules in the guild asynchronously.
getAutomoderationRuleAsync
DiscordGuild : getAutomoderationRuleAsync () -> Vendor.Future
ruleId: string
Gets a specific automoderation rule in the guild asynchronously.
createAutomoderationRuleAsync
DiscordGuild : createAutomoderationRuleAsync () -> Vendor.Future
getAutomoderationRuleBuilder: AutomoderationRuleBuilder
Creates an automoderation rule in the guild asynchronously.
getPreviewAsync
Get the preview of the current Guild
createChannelAsync
DiscordGuild : createChannelAsync () -> Vendor.Future<Objects.DiscordChannel>
channelBuilder: Builders.ChannelBuilder
Creates a Guild Channel under a Guild.
getActiveGuildThreads
Fetches all active guild threads.
addMemberAsync
DiscordGuild : addMemberAsync () -> Vendor.Future<{ Objects.DiscordChannel }>
userId: string
accessToken: string
Adds a discordian to a guild.
getGuildBansAsync
DiscordGuild : getGuildBansAsync () -> Vendor.Future<{ Objects.DiscordGuildBan }>
limit: number?
before: string?
after: string?
Fetches an array of Guild Bans
getGuildBanAsync
Fetches the ban object for a specific user id
bulkGuildBanAsync
Bans up to 200 members asynchronously
bulkGuildBanAsync
Allows you to get all roles within a guild.
bulkGuildBanAsync
Allows you to get all roles within a guild.
setMFALevelAsync
DiscordGuild : setMFALevelAsync () -> Vendor.Future
mfaLevel: number
Setst he guilds MFA level.
getPruneCountAsync
Fetches the prune count.
getPruneCountAsync
Requests discord to prune the Discord guild.
getGuildVoiceRegionsAsync
DiscordGuild : getGuildVoiceRegionsAsync () -> Vendor.Future<{ { id: string, name: string, optimal: boolean, deprecated: boolean, custom: boolean } }>
Fetches the available voice regions for the guild.
getGuildInvitesAsync
Fetches all guild invite objects.
getGuildIntegrationsAsync
Fetches all guild integrations
getGuildWidgetSettingsAsync
DiscordGuild : getGuildWidgetSettingsAsync () -> Vendor.Future<{ enabled: boolean, cannelId: string }>
Fetches the widget settings for the current guild.
updateGuildWidgetSettingsAsync
DiscordGuild : updateGuildWidgetSettingsAsync () -> Vendor.Future<{ enabled: boolean, cannelId: string }>
widgetEnabled: boolean
channelId: string
Updates the widget settings for the current guild
getGuldWidgetAsync
Gets the guild widget for this guild.
getGuildVanityUrlAsync
Gets the vanity url for this guild.
getGuildWelcomeScreenAsync
Gets the guild welcome screen for this guild.
getGuildWidgetImageAsync
DiscordGuild : getGuildWidgetImageAsync () -> Vendor.Future<string>
style: 'shield'
| 'banner1'
| 'banner2'
| 'banner3'
| 'banner4'
Gets the binary PNG image for a server widget
modifyGuildWelcomeScreenAsync
DiscordGuild : modifyGuildWelcomeScreenAsync () -> Vendor.Future
welcomeScreenBuilder: Builders.WelcomeScreenBuilder
Updates the guild welcome screen for this guild.
getGuldOnboardingAsync
Gets the onboarding for this guild
getGuldOnboardingAsync
DiscordGuild : getGuldOnboardingAsync () -> Vendor.Future<Objects.GuildOnboarding>
guildOnboardingBuilder: Builders.OnboardingBuilder
Updates the onboarding for this guild
Functions
new
DiscordGuild . new () -> ()
discordClient: any
guildData: table
Creates a new DiscordGuild instance.