IGuild class abstract

Implemented types

Constructors

IGuild()

Properties

afkChannel Cacheable<Snowflake, IVoiceGuildChannel>?
The guild's afk channel ID, null if not set.
read-only
afkTimeout int
The guild's AFK timeout.
read-only
approxMemberCount int?
The approximate amount of members in this guild.
read-only
approxPresenceCount int?
The approximate amount of presences in the guild.
read-only
autoModerationRules ICache<Snowflake, IAutoModerationRule>
The cached auto moderation rules in the guild. An empty map is returned if none where fetched or added by events.
read-only
available bool
Whether or not the guild is available.
read-only
The banner hash of the guild, if any.
read-only
boostProgressBarEnabled bool
Whether the guild has the boost progress bar enabled
read-only
channels Iterable<IGuildChannel>
The guild's channels.
read-only
client INyxx
Reference to INyxxWebsocket instance
read-only
createdAt DateTime
Gets creation timestamp included in Snowflake
read-onlyinherited
currentUserPermissions IPermissions?
Permission of current(bot) user in this guild
read-only
description String?
The description of this guild. If it's a community guild.
read-only
discoverySplash String?
Discovery splash hash
read-only
embedChannel Cacheable<Snowflake, ITextGuildChannel>?
The channel ID for the guild's widget if enabled.
read-only
embedEnabled bool?
If the guild's widget is enabled.
read-only
emojis Map<Snowflake, IBaseGuildEmoji>
Guild custom emojis
read-only
everyoneRole IRole
Getter for @everyone role
read-only
explicitContentFilterLevel int
Explicit content filter level of this guild.
read-only
features Iterable<GuildFeature>
enabled guild features
read-only
fileUploadLimit int
File upload limit for channel in bytes.
read-only
guildNsfwLevel GuildNsfwLevel
Nsfw level of guild
read-only
hashCode int
The hash code for this object.
read-onlyinherited
icon String?
The guild's icon hash.
read-only
id Snowflake
ID of entity as Snowflake
finalinherited
large bool
If this guild is considered large.
read-only
maximumMembers int
The maximum amount of members that can be in this guild.
read-only
maximumPresences int?
The maximum amount of presences that can be in this guild.
read-only
memberCount int?
The total amount of members in this guild.
read-only
members Map<Snowflake, IMember>
The guild's members.
read-only
mfaLevel int
The guild's MFA level.
read-only
name String
The guild's name.
read-only
notificationLevel int
The guild's notification level.
read-only
owner Cacheable<Snowflake, IUser>
The guild owner's ID
read-only
preferredLocale String
the preferred locale of a "PUBLIC" guild used in server discovery and notices from Discord; defaults to "en-US"
read-only
premiumSubscriptionCount int?
The number of boosts this server currently has
read-only
premiumTier PremiumTier
Boost level of guild
read-only
presences List<IPartialPresence?>
List of partial presences.
read-only
publicUpdatesChannel → CacheableTextChannel<ITextChannel>?
the id of the channel where admins and moderators of "PUBLIC" guilds receive notices from Discord
read-only
roles Map<Snowflake, IRole>
The guild's roles.
read-only
rulesChannel Cacheable<Snowflake, ITextChannel>?
Channel where "PUBLIC" guilds display rules and/or guidelines
read-only
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
scheduledEvents ICache<Snowflake, IGuildEvent>
The cached guild events in the guild. An empty map is returned if none where fetched or added by events.
read-only
selfMember Cacheable<Snowflake, IMember>
Returns member object for bot user
read-only
shard IShard
Returns this guilds shard
read-only
splash String?
Splash hash
read-only
stageInstances Iterable<IStageChannelInstance>
Stage instances in the guild
read-only
stickers Iterable<IGuildSticker>
Stickers of this guild
read-only
systemChannel Cacheable<Snowflake, ITextGuildChannel>?
System channel where system messages are sent
read-only
systemChannelFlags int
System Channel Flags
read-only
url String
Returns url to this guild.
read-only
vanityUrlCode String?
The vanity URL code of this guild. If any.
read-only
verificationLevel int
The guild's verification level.
read-only
voiceStates Map<Snowflake, IVoiceState>
Users state cache
read-only

Methods

ban(SnowflakeEntity user, {int deleteMessageDays = 0, String? auditReason}) Future<void>
Bans a user and allows to delete messages from deleteMessageDays number of days.
bannerUrl({String format = 'webp', int? size, bool animated = true}) String?
URL to guild's banner. If guild doesn't have banner it returns null.
changeOwner(SnowflakeEntity memberEntity, {String? auditReason}) Future<IGuild>
Change guild owner.
createAutoModerationRule(AutoModerationRuleBuilder builder, {String? reason}) Future<IAutoModerationRule>
Creates an auto moderation rule.
createChannel(ChannelBuilder channelBuilder) Future<IChannel>
Allows to create new guild channel
createEmoji(String name, {List<SnowflakeEntity>? roles, AttachmentBuilder? emojiAttachment}) Future<IBaseGuildEmoji>
Allows to create new guild emoji. name is required. You can allow to set roles to restrict emoji usage. Put your image in emojiAttachment field.
createGuildEvent(GuildEventBuilder builder) Future<GuildEvent>
Creates guild event using builder
createRole(RoleBuilder roleBuilder, {String? auditReason}) Future<IRole>
Creates new role
createSticker(StickerBuilder builder) Future<IGuildSticker>
Creates sticker in current guild
delete() Future<void>
Deletes the guild.
deleteAutoModerationRule(Snowflake ruleId, {String? reason}) Future<void>
Deletes an auto moderation rule.
discoveryUrl({String format = 'webp', int? size}) String?
URL to guilds discovery splash If guild doesn't have splash it returns null.
edit(GuildBuilder builder, {String? auditReason}) Future<IGuild>
Edits the guild.
editAutoModerationRule(AutoModerationRuleBuilder builder, Snowflake ruleId, {String? reason}) Future<IAutoModerationRule>
Edits an auto moderation rule.
fetchActiveThreads() Future<IThreadListResultWrapper>
Returns all active threads in the guild, including public and private threads. Threads are ordered by their id, in descending order.
fetchAuditLogs({Snowflake? userId, AuditLogEntryType? auditType, Snowflake? before, int? limit}) Future<IAuditLog>
Returns Audit logs. https://discordapp.com/developers/docs/resources/audit-log
fetchAutoModerationRule(Snowflake ruleId) Future<IAutoModerationRule>
Fetches a sole moderation rule.
fetchAutoModerationRules() Stream<IAutoModerationRule>
Fetches the auto moderation rules.
fetchEmoji(Snowflake emojiId) Future<IBaseGuildEmoji>
Fetches emoji from API
fetchGuildEvent(Snowflake guildEventId) Future<GuildEvent>
Fetches and returns from api single event with given id
fetchGuildEvents({bool withUserCount = false}) Stream<GuildEvent>
Fetches from api list of events in guild
fetchGuildInvites() Stream<IInvite>
Returns list of Guilds invites
fetchGuildPreview() Future<IGuildPreview>
Fetches guild preview for this guild. Allows to download approx member count in guild
fetchMember(Snowflake memberId) Future<IMember>
Fetches member from API
fetchMembers({int limit = 1, Snowflake? after}) Stream<IMember>
Allows to fetch guild members. Restricted with GatewayIntents.guildMembers. after is used to continue from specified user id. By default limits to one user - use limit parameter to change that behavior.
fetchRoles() Stream<IRole>
Fetches all roles that are in the server.
fetchSticker(Snowflake id) Future<IGuildSticker>
Fetch sticker with given id
fetchStickers() Stream<IGuildSticker>
Fetches all stickers of current guild
fetchWelcomeScreen() Future<IGuildWelcomeScreen?>
Fetches the welcome screen of this guild if it's a community guild.
getBan(Snowflake bannedUserId) Future<IBan>
Gets single Ban object for given bannedUserId
getBans({int limit = 1000, Snowflake? before, Snowflake? after}) Stream<IBan>
Gets the guild's bans.
getVoiceRegions() Stream<IVoiceRegion>
Returns list of available VoiceRegions
guildWidgetUrl([String style = "shield"]) String
Allows to download IGuild widget aka advert png Possible options for style: shield (default), banner1, banner2, banner3, banner4
iconUrl({String format = 'webp', int? size, bool animated = true}) 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 they're able to rejoin if they have a valid invite link.
leave() Future<void>
Leaves the guild.
modifyCurrentMember({String? nick}) Future<void>
Change self nickname in guild
moveChannel(IChannel channel, int position, {String? auditReason}) Future<void>
Moves channel
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
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<IMember>
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 = 1}) Stream<IMember>
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}) String?
URL to guild's splash. If guild doesn't have splash it returns null.
toString() String
A string representation of this object.
inherited
unban(Snowflake userId) Future<void>
Unbans a user by ID.

Operators

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