Table of Contents
API reference

Method GetCurrentUserGuildsAsync

Namespace
DisCatSharp
Assembly
DisCatSharp.dll

GetCurrentUserGuildsAsync(int?, int, ulong?, ulong?, CancellationToken)

Gets a page of the current bot's guilds through the HTTP API.

public Task<IReadOnlyList<DiscordGuild>> GetCurrentUserGuildsAsync(int? shard = null, int limit = 100, ulong? before = null, ulong? after = null, CancellationToken cancellationToken = default)

Parameters

shard int?

The large-bot guild-list shard, distinct from a gateway shard ID. Required by Discord for large-bot sharding.

limit int

Maximum number of guilds returned, from 1 through 200.

before ulong?

Return guilds before this ID.

after ulong?

Return guilds after this ID.

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<IReadOnlyList<DiscordGuild>>

Cached guilds where available, otherwise partial guild objects returned by Discord.