Guild class Null safety



afkChannel Cacheable<Snowflake, VoiceGuildChannel>?
The guild's afk channel ID, null if not set.
read / write
afkTimeout int
The guild's AFK timeout.
final, read / write, late
available bool
Whether or not the guild is available.
final, read / write, late
channels Iterable<GuildChannel>
The guild's channels.
client INyxx
Reference to Nyxx instance
createdAt DateTime
Gets creation timestamp included in Snowflake
read-only, inherited
currentUserPermissions Permissions?
Permission of current(bot) user in this guild
final, read / write, late
discoverySplash String?
Discovery splash hash
read / write
embedChannel Cacheable<Snowflake, TextGuildChannel>?
The channel ID for the guild's widget if enabled.
final, read / write, late
embedEnabled bool?
If the guild's widget is enabled.
final, read / write, late
emojis Cache<Snowflake, IGuildEmoji>
Guild custom emojis
final, read / write, late
everyoneRole Role
Getter for @everyone role
features Iterable<GuildFeature>
enabled guild features
final, read / write, late
fileUploadLimit int
File upload limit for channel in bytes.
guildNsfwLevel GuildNsfwLevel
Nsfw level of guild
final, read / write, late
hashCode int
The hash code for this object. [...]
read-only, inherited
icon String?
The guild's icon hash.
read / write
id Snowflake
ID of entity as Snowflake
final, inherited
members Cache<Snowflake, Member>
The guild's members.
final, read / write, late
mfaLevel int
The guild's MFA level.
final, read / write, late
name String
The guild's name.
final, read / write, late
notificationLevel int
The guild's notification level.
final, read / write, late
owner Cacheable<Snowflake, User>
The guild owner's ID
final, read / write, late
preferredLocale String
the preferred locale of a "PUBLIC" guild used in server discovery and notices from Discord; defaults to "en-US"
final, read / write, late
premiumSubscriptionCount int?
The number of boosts this server currently has
final, read / write, late
premiumTier PremiumTier
Boost level of guild
final, read / write, late
publicUpdatesChannel CacheableTextChannel<TextChannel>?
the id of the channel where admins and moderators of "PUBLIC" guilds receive notices from Discord
final, read / write, late
region String
The guild's voice region.
read / write
roles Cache<Snowflake, Role>
The guild's roles.
final, read / write, late
rulesChannel Cacheable<Snowflake, TextChannel>?
Channel where "PUBLIC" guilds display rules and/or guidelines
final, read / write, late
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
selfMember Cacheable<Snowflake, Member>
Returns member object for bot user
shard Shard
Returns this guilds shard
splash String?
Splash hash
read / write
stageInstances Iterable<StageChannelInstance>
Stage instances in the guild
final, read / write, late
systemChannel Cacheable<Snowflake, TextGuildChannel>?
System channel where system messages are sent
final, read / write, late
systemChannelFlags int
System Channel Flags
final, read / write, late
url String
Returns url to this guild.
verificationLevel int
The guild's verification level.
final, read / write, late
voiceStates Cache<Snowflake, VoiceState>
Users state cache
final, read / write, late


ban(SnowflakeEntity user, {int deleteMessageDays = 0, String? auditReason}) Future<void>
Bans a user and allows to delete messages from deleteMessageDays number of days. [...]
changeOwner(SnowflakeEntity memberEntity, {String? auditReason}) Future<Guild>
Change guild owner.
changeSelfNick(String nick) Future<void>
Change self nickname in guild
createChannel(ChannelBuilder channelBuilder) Future<IChannel>
Allows to create new guild channel
createEmoji(String name, {List<SnowflakeEntity>? roles, File? imageFile, List<int>? imageBytes, String? encodedImage, String? encodedExtension}) Future<GuildEmoji>
Allows to create new guild emoji. name is required and you have to specify one of other parameters: imageFile, imageBytes or encodedImage. imageBytes can be useful if you want to create image from http response. [...]
createRole(RoleBuilder roleBuilder, {String? auditReason}) Future<Role>
Creates new role [...]
delete() Future<void>
Deletes the guild.
discoveryURL({String format = "webp", int size = 128}) String?
URL to guilds discovery splash If guild doesn't have splash it returns null.
edit({String? name, int? verificationLevel, int? notificationLevel, SnowflakeEntity? afkChannel, int? afkTimeout, String? icon, String? auditReason}) Future<Guild>
Edits the guild.
fetchAuditLogs({Snowflake? userId, int? actionType, Snowflake? before, int? limit}) Future<AuditLog>
Returns Audit logs. [...]
fetchEmoji(Snowflake emojiId) Future<IGuildEmoji>
Fetches emoji from API
fetchGuildInvites() Stream<Invite>
Returns list of Guilds invites
fetchGuildPreview() Future<GuildPreview>
Fetches guild preview for this guild. Allows to download approx member count in guild
fetchMember(Snowflake memberId) Future<Member>
Fetches member from API
fetchMembers({int limit = 1, Snowflake? after}) Stream<Member>
Allows to fetch guild members. In future will be restricted with Privileged Intents. after is used to continue from specified user id. By default limits to one user - use limit parameter to change that behavior.
getBan(Snowflake bannedUserId) Future<Ban>
Gets single Ban object for given bannedUserId
getBans() Stream<Ban>
Get"s the guild's bans.
getVoiceRegions() Stream<VoiceRegion>
Returns list of available VoiceRegions
guildWidgetUrl([String style = "shield"]) String
Allows to download Guild widget aka advert png Possible options for style: shield (default), banner1, banner2, banner3, banner4
iconURL({String format = "webp", int size = 128}) String?
The guild's icon, represented as URL. If guild doesn't have icon it returns null.
kick(SnowflakeEntity user, {String? auditReason}) Future<void>
Kicks user from guild. Member is removed from guild and he is able to rejoin [...]
leave() Future<void>
Leaves the guild.
moveChannel(IChannel channel, int position, {String? auditReason}) Future<void>
Moves channel
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
prune(int days, {Iterable<Snowflake>? includeRoles, String? auditReason}) Future<int>
Prunes the guild, returns the amount of members pruned.
pruneCount(int days, {Iterable<Snowflake>? includeRoles}) Future<int>
Returns int indicating the number of members that would be removed in a prune operation.
requestChunking() → void
Request members from gateway. Requires privileged intents in order to work.
searchMembers(String query, {int limit = 1}) Stream<Member>
Returns a Stream of Members objects whose username or nickname starts with a provided string. By default limits to one entry - can be changed with limit parameter.
searchMembersGateway(String query, {int limit = 0}) Stream<Member>
Returns a Stream of Members objects whose username or nickname starts with a provided string. By default limits to one entry - can be changed with limit parameter.
splashURL({String format = "webp", int size = 128}) String?
URL to guild's splash. If guild doesn't have splash it returns null.
toString() String
A string representation of this object. [...]
unban(Snowflake id, Snowflake userId) Future<void>
Unbans a user by ID.


operator ==(dynamic other) bool
The equality operator. [...]