Table of Contents
API reference

Method GetUsernameAsync

Namespace
DisCatSharp.Experimental
Assembly
DisCatSharp.Experimental.dll

GetUsernameAsync(DiscordClient, ulong, CancellationToken)

This is a test method to test the functionality of DisCatSharp.Experimental and the DisCatSharp.Analyzer.

[Experimental("This function is being tested and might change at any time.")]
[RequiresFeature(Features.MonetizedApplication)]
public static Task<string> GetUsernameAsync(this DiscordClient client, ulong id, CancellationToken cancellationToken = default)

Parameters

client DiscordClient

The discord client.

id ulong

The id of the user to get the username of.

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<string>

The username of the user with the given id.