Table of Contents
API reference

Method GetCurrentUserGuildsAsync

Namespace
DisCatSharp
Assembly
DisCatSharp.dll

GetCurrentUserGuildsAsync(DiscordAccessToken, CancellationToken)

Gets the current user's guilds.

public Task<IReadOnlyList<DiscordGuild>> GetCurrentUserGuildsAsync(DiscordAccessToken accessToken, CancellationToken cancellationToken = default)

Parameters

accessToken DiscordAccessToken

The discord access token.

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<IReadOnlyList<DiscordGuild>>

GetCurrentUserGuildsAsync(DiscordAccessToken, int, CancellationToken)

Gets guilds in a large-bot guild-list shard. This shard is not a gateway shard ID.

public Task<IReadOnlyList<DiscordGuild>> GetCurrentUserGuildsAsync(DiscordAccessToken accessToken, int shard, CancellationToken cancellationToken = default)

Parameters

accessToken DiscordAccessToken

The Discord access token with the guilds scope.

shard int

The guild-list shard, from zero to the session start maximum concurrency minus one.

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<IReadOnlyList<DiscordGuild>>

The guilds returned for the specified shard.