Class KuracordMember
Represents a Kuracord guild member.
Implements
Inherited Members
Namespace: KSharpPlus.Entities.Guild
Assembly: KSharpPlus.dll
Syntax
public class KuracordMember : SnowflakeObject
Properties
| Improve this Doc View SourceDisplayName
Gets this member's display name.
Declaration
public string DisplayName { get; }
Property Value
Type | Description |
---|---|
String |
Guild
Gets the guild of which this member is a part of.
Declaration
public KuracordGuild Guild { get; set; }
Property Value
Type | Description |
---|---|
KuracordGuild |
IsOwner
Gets whether this member is the Guild owner.
Declaration
public bool IsOwner { get; }
Property Value
Type | Description |
---|---|
Boolean |
JoinedAt
Date the user joined the guild
Declaration
public DateTimeOffset JoinedAt { get; }
Property Value
Type | Description |
---|---|
DateTimeOffset |
Nickname
Gets this member's nickname.
Declaration
public string Nickname { get; }
Property Value
Type | Description |
---|---|
String |
User
Gets the user associated with this member.
Declaration
public KuracordUser User { get; }
Property Value
Type | Description |
---|---|
KuracordUser |
Methods
| Improve this Doc View SourceEquals(KuracordMember)
Checks whether this KuracordMember is equal to another KuracordMember.
Declaration
public bool Equals(KuracordMember e)
Parameters
Type | Name | Description |
---|---|---|
KuracordMember | e | KuracordMember to compare to. |
Returns
Type | Description |
---|---|
Boolean | Whether the KuracordMember is equal to this KuracordMember. |
Equals(Object)
Checks whether this KuracordMember is equal to another object.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj | Object to compare to. |
Returns
Type | Description |
---|---|
Boolean | Whether the object is equal to this KuracordMember. |
Overrides
| Improve this Doc View SourceGetHashCode()
Gets the hash code for this KuracordMember.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 | The hash code for this KuracordMember. |
Overrides
| Improve this Doc View SourceModifyAsync(String)
Modifies the member.
Declaration
public Task<KuracordMember> ModifyAsync(string nickname)
Parameters
Type | Name | Description |
---|---|---|
String | nickname | New member nickname. |
Returns
Type | Description |
---|---|
Task<KuracordMember> | Modified member. |
Exceptions
Type | Condition |
---|---|
UnauthorizedException | Thrown when the client does not have the Administrator permission. |
NotFoundException | Thrown when the member does not exist. |
BadRequestException | Thrown when an invalid parameter was provided. |
ServerErrorException | Thrown when Kuracord is unable to process the request. |
RemoveAsync()
Kicks this member from their guild.
Declaration
public Task RemoveAsync()
Returns
Type | Description |
---|---|
Task |
Exceptions
Type | Condition |
---|---|
UnauthorizedException | Thrown when the client does not have the KickMembers permission. |
NotFoundException | Thrown when the member does not exist. |
BadRequestException | Thrown when an invalid parameter was provided. |
ServerErrorException | Thrown when Kuracord is unable to process the request. |
ToString()
Returns a string representation of this member.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String | String representation of this member. |
Overrides
Operators
| Improve this Doc View SourceEquality(KuracordMember, KuracordMember)
Gets whether the two KuracordMember objects are equal.
Declaration
public static bool operator ==(KuracordMember e1, KuracordMember e2)
Parameters
Type | Name | Description |
---|---|---|
KuracordMember | e1 | First member to compare. |
KuracordMember | e2 | Second member to compare. |
Returns
Type | Description |
---|---|
Boolean | Whether the two members are equal. |
Inequality(KuracordMember, KuracordMember)
Gets whether the two KuracordMember objects are not equal.
Declaration
public static bool operator !=(KuracordMember e1, KuracordMember e2)
Parameters
Type | Name | Description |
---|---|---|
KuracordMember | e1 | First member to compare. |
KuracordMember | e2 | Second member to compare. |
Returns
Type | Description |
---|---|
Boolean | Whether the two members are not equal. |