Class DiscordMember
- Namespace
- DisCatSharp.Entities
- Assembly
- DisCatSharp.dll
Represents a Discord guild member.
public class DiscordMember : DiscordUser, IEquatable<DiscordUser>, IEquatable<DiscordMember>
- Inheritance
-
DiscordMember
- Implements
- Inherited Members
- Extension Methods
Fields
- GuildId
Gets the guild id for this member.
Properties
- AvatarDecorationData
Gets the member's user avatar decoration data.
- AvatarHash
Gets the member's user avatar hash.
- BannerColor
The color of this member's banner. Mutually exclusive with GuildBannerHash.
- BannerHash
Gets the member's user banner hash.
- Clan
Gets the member's clan.
- Color
Gets the color associated with this user's top color-giving role, otherwise 0 (no color).
warning
This will throw if accessed for an oauth2 constructed member.
- CommunicationDisabledUntil
Date until the can communicate again.
- Discriminator
Gets the member's 4-digit discriminator.
- DisplayName
Gets this member's display name.
Gets the member's email address.
This is only present in OAuth.
- Flags
Gets the member's flags for OAuth.
- GlobalName
Gets the member's global name.
- Guild
Gets the guild of which this member is a part of.
warning
This will throw if accessed for an oauth2 constructed member.
- GuildAvatarDecorationData
Gets the members guild avatar decoration data.
- GuildAvatarHash
Gets the members avatar hash.
- GuildAvatarUrl
Gets the members avatar URL.
- GuildBannerHash
Gets the members banner hash.
- GuildBannerUrl
Gets the members banner URL.
- GuildBio
Gets the members guild bio. This is not available to bots tho.
- GuildPronouns
Gets the members's pronouns.
- HasUnusualDmActivity
Whether the user has their communication disabled.
- Hierarchy
Gets the member's position in the role hierarchy, which is the member's highest role's position. Returns MaxValue for the guild's owner.
- InteractionPermissions
Gets the permissions for the current member.
- IsBot
Gets whether the member is a bot.
- IsCommunicationDisabled
Whether the user has their communication disabled.
- IsDeafened
If the user is deafened
- IsMigrated
Whether this user account is migrated to the new username system.
Learn more at dis.gd/usernames.
- IsMuted
If the user is muted
- IsOwner
Gets whether this member is the Guild owner.
warning
This will throw if accessed for an oauth2 constructed member.
- IsPending
Whether the user has not passed the guild's Membership Screening requirements yet.
- IsSystem
Gets whether the member is an official Discord system user.
- JoinedAt
Date the user joined the guild
- Locale
Gets the member's chosen language
- ManualUser
Sets the user when converting a json object to DiscordMember while not having access to the user cache.
- MemberFlags
Gets the members flags.
- MfaEnabled
Gets whether the member has multi-factor authentication enabled.
- Nickname
Gets this member's nickname.
- OAuthFlags
Gets the user's flags.
- Permissions
Gets the permissions for the current member.
warning
This will throw if accessed for an oauth2 constructed member.
- PremiumSince
Date the user started boosting this server
- RoleIds
List of role ids
- Roles
Gets the list of roles associated with this member.
warning
This will throw if accessed for an oauth2 constructed member.
- UnusualDmActivityUntil
Datetime until unusual dm activity time happened.
- Username
Gets this member's username.
- UsernameWithDiscriminator
Gets the member's username with discriminator.
- UsernameWithGlobalName
Gets the member's username with global name.
- Verified
Gets whether the member is verified.
This is only present in OAuth.
- VoiceState
Gets this member's voice state.
warning
This will throw if accessed for an oauth2 constructed member.
Methods
- BanAsync(int, string?)
Bans this member from their guild.
- DisconnectFromVoiceAsync()
Disconnects the member from their current voice channel.
- Equals(DiscordMember)
Checks whether this DiscordMember is equal to another DiscordMember.
- Equals(object)
Checks whether this DiscordMember is equal to another object.
- GetHashCode()
Gets the hash code for this DiscordMember.
- GetVoiceStateAsync()
Gets the member's voice state.
- GrantRoleAsync(DiscordRole, string?)
Grants a role to the member.
- MakeSpeakerAsync()
Makes the user a speaker.
- ModifyAsync(Action<MemberEditModel>)
Modifies this member.
- MoveToAudienceAsync()
Moves the user to audience.
- PermissionsIn(DiscordChannel)
Calculates permissions in a given channel for this member.
- PlaceInAsync(DiscordChannel)
Moves this member to the specified voice channel
- RemoveAsync(string?)
Kicks this member from their guild.
- RemoveTimeoutAsync(string)
Removes the timeout from a member.
- ReplaceRolesAsync(IEnumerable<DiscordRole>, string?)
Sets the member's roles to ones specified.
- RevokeRoleAsync(DiscordRole, string?)
Revokes a role from a member.
- SetDeafAsync(bool, string?)
Sets this member's voice deaf status.
- SetMuteAsync(bool, string?)
Sets this member's voice mute status.
- TimeoutAsync(DateTime, string?)
Adds a timeout to a member.
- TimeoutAsync(DateTimeOffset, string?)
Adds a timeout to a member.
- TimeoutAsync(TimeSpan, string?)
Adds a timeout to a member.
- ToString()
Returns a string representation of this member.
- UnbanAsync(string?)
Unbans this member from their guild.
- UnverifyAsync(string?)
Manually unverifies the member to not bypass the Membership Screening requirements anymore.
- UpdateVoiceStateAsync(DiscordChannel, bool?)
Updates the member's suppress state in a stage channel.
- VerifyAsync(string?)
Manually verifies the member to bypass the Membership Screening requirements.
Operators
- operator ==(DiscordMember, DiscordMember)
Gets whether the two DiscordMember objects are equal.
- operator !=(DiscordMember, DiscordMember)
Gets whether the two DiscordMember objects are not equal.