Guild class
Guild structure
- These fields are only sent within the GUILD_CREATE event
** These fields are only sent when using the GET Current User Guilds endpoint and are relative to the requested user
https://discord.com/developers/docs/resources/guild#guild-object-guild-structure
- Annotations
-
- @JsonSerializable(includeIfNull: false)
Constructors
-
Guild({required String id, required String name, String? icon, String? iconHash, String? splash, String? discoverySplash, bool? owner, String? ownerId, List<
Permission> ? permissions, String? afkChannelId, int? afkTimeout, bool? widgetEnabled, String? widgetChannelId, VerificationLevel? verificationLevel, DefaultMessageNotificationLevel? defaultMessageNotifications, ExplicitContentFilterLevel? explicitContentFilter, List<Role> ? roles, List<Emoji> ? emojis, List<GuildFeature> ? features, MfaLevel? mfaLevel, String? applicationId, String? systemChannelId, List<SystemChannelFlag> ? systemChannelFlags, String? rulesChannelId, DateTime? joinedAt, bool? large, int? memberCount, List<VoiceState> ? voiceStates, List<GuildMember> ? members, List<Channel> ? channels, List<Channel> ? threads, List<PresenceUpdateEvent> ? presences, int? maxPresences, int? maxMembers, String? vanityUrlCode, String? description, String? banner, String? preferredLocale, String? publicUpdatesChannelId, int? maxVideoChannelUsers, int? approximateMemberCount, int? approximatePresenceCount, WelcomeScreen? welcomeScreen, GuildNsfwLevel? nsfwLevel, List<StageInstance> ? stageInstances, List<Sticker> ? stickers, List<GuildScheduledEvent> ? guildScheduledEvents, }) - Constructor
-
Guild.fromJson(Map<
String, dynamic> json) -
From json
factory
Properties
- afkChannelId → String?
-
id of afk channel
final
- afkTimeout → int?
-
afk timeout in seconds
final
- applicationId → String?
-
application id of the guild creator if it is bot-created
final
- approximateMemberCount → int?
-
approximate number of members in this guild, returned from the GET
/guilds/
final
- approximatePresenceCount → int?
-
approximate number of non-offline members in this guild, returned from the
GET /guilds/
final
-
banner hash
final
-
channels
→ List<
Channel> ? -
channels in the guild
final
- defaultMessageNotifications → DefaultMessageNotificationLevel?
-
default message notifications level
final
- description → String?
-
the description of a Community guild
final
- discoverySplash → String?
-
discovery splash hash; only present for guilds with the "DISCOVERABLE"
feature
final
-
emojis
→ List<
Emoji> ? -
custom guild emojis
final
- explicitContentFilter → ExplicitContentFilterLevel?
-
explicit content filter level
final
-
features
→ List<
GuildFeature> ? -
enabled guild features
final
-
guildScheduledEvents
→ List<
GuildScheduledEvent> ? -
The scheduled events in the guild
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- icon → String?
-
icon hash
final
- iconHash → String?
-
icon hash, returned when in the template object
final
- id → String
-
guild id
final
- joinedAt → DateTime?
-
when this guild was joined at
final
- large → bool?
-
true if this is considered a large guild
final
- maxMembers → int?
-
the maximum number of members for the guild
final
- maxPresences → int?
-
the maximum number of presences for the guild (null is always returned,
apart from the largest of guilds)
final
- maxVideoChannelUsers → int?
-
the maximum amount of users in a video channel
final
- memberCount → int?
-
total number of members in this guild
final
-
members
→ List<
GuildMember> ? -
users in the guild
final
- mfaLevel → MfaLevel?
-
required MFA level for the guild
final
- name → String
-
guild name (2-100 characters, excluding trailing and leading whitespace)
final
- nsfwLevel → GuildNsfwLevel?
-
guild NSFW level
final
- owner → bool?
-
true if the user is the owner of the guild
final
- ownerId → String?
-
id of the owner
final
-
permissions
→ List<
Permission> ? -
total permissions for the user in the guild (excludes overwrites)
final
- preferredLocale → String?
-
the preferred locale of a Community guild; used in server discovery and
notices from Discord; defaults to "en-US"
final
-
whether the guild has the boost progress bar enabled
final
-
the number of boosts this guild currently has
final
-
premium tier (Server Boost level)
final
-
presences
→ List<
PresenceUpdateEvent> ? -
presences of the members in the guild, will only include non-offline
members if the size is greater than large threshold
final
- publicUpdatesChannelId → String?
-
the id of the channel where admins and moderators of Community guilds
receive notices from Discord
final
-
roles
→ List<
Role> ? -
roles in the guild
final
- rulesChannelId → String?
-
the id of the channel where Community guilds can display rules and/or
guidelines
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- splash → String?
-
splash hash
final
-
stageInstances
→ List<
StageInstance> ? -
Stage instances in the guild
final
-
stickers
→ List<
Sticker> ? -
custom guild stickers
final
-
systemChannelFlags
→ List<
SystemChannelFlag> ? -
system channel flags
final
- systemChannelId → String?
-
the id of the channel where guild notices such as welcome messages and
boost events are posted
final
-
threads
→ List<
Channel> ? -
all active threads in the guild that current user has permission to view
final
-
true if this guild is unavailable due to an outage
final
- vanityUrlCode → String?
-
the vanity url code for the guild
final
- verificationLevel → VerificationLevel?
-
verification level required for the guild
final
-
voiceStates
→ List<
VoiceState> ? -
states of members currently in voice channels; lacks the guild_id key
final
- welcomeScreen → WelcomeScreen?
-
the welcome screen of a Community guild, shown to new members, returned in
an Invite's guild object
final
- widgetChannelId → String?
-
the channel id that the widget will generate an invite to, or null if set
to no invite
final
- widgetEnabled → bool?
-
true if the server widget is enabled
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - To json
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited