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
accessTokenDiscordAccessTokenThe discord access token.
cancellationTokenCancellationTokenA token to cancel the request.
Returns
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
accessTokenDiscordAccessTokenThe Discord access token with the guilds scope.
shardintThe guild-list shard, from zero to the session start maximum concurrency minus one.
cancellationTokenCancellationTokenA token to cancel the request.
Returns
- Task<IReadOnlyList<DiscordGuild>>
The guilds returned for the specified shard.