Guild class

Represent Discord serveur as Class.

Constructors

Guild(Snowflake _id, String _name, Snowflake _ownerId, ImageFormater? _icon, String? _iconHash, ImageFormater? _splash, ImageFormater? _discoverySplash, int? _permissions, Snowflake? _afkChannelId, int _afkTimeout, bool _widgetEnabled, Snowflake? _widgetChannelId, VerificationLevel _verificationLevel, int _defaultMessageNotifications, int _explicitContentFilter, GuildRoleManager _roles, int _mfaLevel, Snowflake? _applicationId, Snowflake? _systemChannelId, int _systemChannelFlags, Snowflake? _rulesChannelId, int? _maxPresences, int _maxMembers, String? _description, ImageFormater? _banner, int _premiumTier, int _premiumSubscriptionCount, String _preferredLocale, Snowflake? _publicUpdatesChannelId, int _maxVideoChannelUsers, int? _approximateMemberCount, int? _approximatePresenceCount, WelcomeScreen? _welcomeScreen, int _nsfwLevel, StickerManager _stickers, bool _premiumProgressBarEnabled, MemberManager _members, ChannelManager _channels, EmojiManager _emojis, List<GuildFeature> _features, ModerationRuleManager _moderationRules, GuildWebhookManager _webhooks, GuildScheduledEventService _scheduledEvents, CommandService _commands, GuildInviteManager _invites)
Guild.from({required EmojiManager emojiManager, required MemberManager memberManager, required GuildRoleManager roleManager, required ChannelManager channelManager, required ModerationRuleManager moderationRuleManager, required WebhookManager webhookManager, required GuildScheduledEventService guildScheduledEventService, required dynamic payload})
factory

Properties

afkChannel VoiceChannel?
getter/setter pair
afkChannelId Snowflake?
The Guild's afk channel.
no setter
afkTimeout int
The Guild's afk timeout.
no setter
applicationId Snowflake?
The Guild's application id.
no setter
approximateMemberCount int?
The Guild's approximate member count.
no setter
approximatePresenceCount int?
The Guild's approximate presence count.
no setter
The Guild's banner.
no setter
bots Map<Snowflake, GuildMember>
The Guild's bot members.
no setter
channels → ChannelManager
The Guild's channels manager.
no setter
commands → CommandService
The Guild's commands manager.
no setter
createdAt DateTime
The Guild's creation date.
no setter
defaultMessageNotifications NotificationLevel
The Guild's default message notifications.
no setter
description String?
The Guild's description.
no setter
discoverySplash ImageFormater?
The Guild's discovery splash.
no setter
emojis → EmojiManager
The Guild's emojis manager.
no setter
explicitContentFilter ExplicitContentLevel
The Guild's explicit content filter.
no setter
features List<GuildFeature>
The Guild's features.
no setter
hashCode int
The hash code for this object.
no setterinherited
icon ImageFormater?
The Guild's icon.
no setter
iconHash String?
The Guild's icon hash.
no setter
id Snowflake
The Guild's id.
no setter
invites → GuildInviteManager
The Guild's invites manager.
no setter
maxMembers int
The Guild's max members.
no setter
maxPresences int?
The Guild's max presences.
no setter
maxVideoChannelUsers int
The Guild's max video channel users.
no setter
members → MemberManager
The Guild's members manager.
no setter
mfaLevel int
The Guild's mfa level.
no setter
moderationRules → ModerationRuleManager
The Guild's moderation rules manager.
no setter
name String
The Guild's name.
no setter
nsfwLevel int
The Guild's nsfw level.
no setter
owner GuildMember
The Guild's owner.
no setter
permissions int?
The Guild's permissions.
no setter
preferredLocale Locale
The Guild's preferred locale.
no setter
premiumProgressBarEnabled bool
The Guild's premium progress bar enabled.
no setter
premiumSubscriptionCount int
The Guild's premium subscription count.
no setter
premiumTier int
The Guild's premium tier.
no setter
publicUpdatesChannel TextChannel?
getter/setter pair
publicUpdatesChannelId Snowflake?
The Guild's public updates channel id.
no setter
roles → GuildRoleManager
The Guild's roles.
no setter
rulesChannel TextChannel?
getter/setter pair
rulesChannelId Snowflake?
The Guild's rules channel id.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scheduledEvents → GuildScheduledEventService
The Guild's scheduled events manager.
no setter
splash ImageFormater?
The Guild's splash.
no setter
stickers → StickerManager
The Guild's stickers.
no setter
systemChannel TextChannel?
getter/setter pair
systemChannelFlags int
The Guild's system channel.
no setter
systemChannelId Snowflake?
The Guild's system channel id.
no setter
vanity VanityInvite?
getter/setter pair
verificationLevel VerificationLevel
The Guild's verification level.
no setter
webhooks → GuildWebhookManager
The Guild's webhooks manager.
no setter
welcomeScreen → WelcomeScreen?
The Guild's welcome screen.
no setter
widgetChannelId Snowflake?
The Guild's widget channel.
no setter
widgetEnabled bool
The Guild's widget enabled.
no setter

Methods

delete() Future<bool>
Delete this
leave() Future<void>
Remove the discord client of this
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
preview() Future<GuildPreview>
Get Guild as EmbedBuilder format.
removeBanner() Future<void>
Remove the banner of this
removeDiscoverySplash() Future<void>
Remove the discovery splash banner of this
removeIcon() Future<void>
Remove the icon of this
removeSplash() Future<void>
Remove the splash banner of this
setAfkChannel(VoiceChannel channel) Future<void>
Update the afk channel
setBanner(String filename) Future<void>
Update the banner of this
setDiscoverySplash(String filename) Future<void>
Update the discovery splash banner of this
setExplicitContentFilter(ExplicitContentLevel level) Future<void>
Defines the explicit content level of this
setIcon(String filename) Future<void>
Update the icon of this.
setMessageNotification(NotificationLevel level) Future<void>
Defines the notification level of this
setName(String name) Future<void>
Used to update the name of this
setOwner(GuildMember guildMember) Future<void>
Update the owner of this
setPreferredLocale(Locale locale) Future<void>
Update preferred language of this
setPublicUpdateChannel(TextChannel channel) Future<void>
Update public updates channel of this
setRulesChannel(TextChannel channel) Future<void>
Update rules channel of this
setSplash(String filename) Future<void>
Update the splash banner of this
setSystemChannel(TextChannel channel) Future<void>
Update system channel of this
setVerificationLevel(VerificationLevel level) Future<void>
Modifies the VerificationLevel of this.
toString() String
A string representation of this object.
inherited
unban(Snowflake memberId, {String? reason}) Future<bool>
Unbanned member from this.

Operators

operator ==(Object other) bool
The equality operator.
inherited