Interface IUser
- Namespace
- Kook
- Assembly
- Kook.Net.Core.dll
Represents a generic user.
public interface IUser : IEntity<ulong>, IMentionable, IPresence
- Inherited Members
- Extension Methods
Properties
Avatar
Gets the link to this user's avatar.
string Avatar { get; }
Property Value
Banner
Gets the link to this user's banner.
string? Banner { get; }
Property Value
BuffAvatar
Gets the link to this user's BUFF avatar.
string? BuffAvatar { get; }
Property Value
HasAnnualBuff
Gets whether this user's BUFF subscription is annual; null
if unknown.
bool? HasAnnualBuff { get; }
Property Value
- bool?
HasBuff
Gets whether this user has subscribed to BUFF; null
if unknown.
bool? HasBuff { get; }
Property Value
- bool?
IdentifyNumber
Gets the per-username unique ID for this user.
string IdentifyNumber { get; }
Property Value
IdentifyNumberValue
Gets the per-username unique ID for this user.
ushort IdentifyNumberValue { get; }
Property Value
IsBanned
Gets whether this user is banned; null
if unknown.
bool? IsBanned { get; }
Property Value
- bool?
IsBot
Gets whether this user is a bot; null
if unknown.
bool? IsBot { get; }
Property Value
- bool?
IsDenoiseEnabled
Gets whether this user enabled denoise feature; null
if unknown.
bool? IsDenoiseEnabled { get; }
Property Value
- bool?
IsSystemUser
Gets whether this user is a system user.
bool IsSystemUser { get; }
Property Value
Nameplates
Gets the nameplates this user has.
IReadOnlyCollection<Nameplate> Nameplates { get; }
Property Value
UserTag
Get the tag this user has.
UserTag? UserTag { get; }
Property Value
Username
Gets the username for this user.
string Username { get; }
Property Value
Methods
BlockAsync(RequestOptions?)
Gets the friend state with this user.
Task BlockAsync(RequestOptions? options = null)
Parameters
options
RequestOptionsThe options to be used when sending the request.
Returns
- Task
A task that represents the asynchronous operation for getting the friend state.
CreateDMChannelAsync(RequestOptions?)
Creates the direct message channel of this user.
Task<IDMChannel> CreateDMChannelAsync(RequestOptions? options = null)
Parameters
options
RequestOptionsThe options to be used when sending the request.
Returns
- Task<IDMChannel>
A task that represents the asynchronous operation for getting or creating a DM channel. The task result contains the DM channel associated with this user.
Remarks
This method is used to obtain or create a channel used to send a direct message.
warning
In event that the current user cannot send a message to the target user, a channel can and will still be created by Kook. However, attempting to send a message will yield a HttpException with a 403 as its HttpCode. There are currently no official workarounds by Kook.
GetIntimacyAsync(RequestOptions?)
Gets the intimacy information with this user.
Task<IIntimacy> GetIntimacyAsync(RequestOptions? options = null)
Parameters
options
RequestOptionsThe options to be used when sending the request.
Returns
- Task<IIntimacy>
A task that represents the asynchronous operation for getting the intimacy information. The task result contains the intimacy information associated with this user.
RemoveFriendAsync(RequestOptions?)
Gets the friend state with this user.
Task RemoveFriendAsync(RequestOptions? options = null)
Parameters
options
RequestOptionsThe options to be used when sending the request.
Returns
- Task
A task that represents the asynchronous operation for getting the friend state.
RequestFriendAsync(RequestOptions?)
Sends a friend request to this user.
Task RequestFriendAsync(RequestOptions? options = null)
Parameters
options
RequestOptionsThe options to be used when sending the request.
Returns
- Task
A task that represents the asynchronous operation for sending the friend request.
UnblockAsync(RequestOptions?)
Gets the friend state with this user.
Task UnblockAsync(RequestOptions? options = null)
Parameters
options
RequestOptionsThe options to be used when sending the request.
Returns
- Task
A task that represents the asynchronous operation for getting the friend state.
UpdateIntimacyAsync(Action<IntimacyProperties>, RequestOptions?)
Updates the intimacy information with this user.
Task UpdateIntimacyAsync(Action<IntimacyProperties> func, RequestOptions? options = null)
Parameters
func
Action<IntimacyProperties>A delegate containing the properties to modify the IIntimacy with.
options
RequestOptionsThe options to be used when sending the request.
Returns
- Task
A task that represents the asynchronous operation for updating the intimacy information.