Table of Contents

Method GetGuildsBeforeAsync

Namespace
DSharpPlus
Assembly
DSharpPlus.dll

GetGuildsBeforeAsync(ulong, int, bool?, CancellationToken)

Returns a list of guilds before a certain guild. This will execute one API request per 200 guilds.

The amount of guilds to fetch.The ID of the guild before which we fetch the guildsWhether to include approximate member and presence counts in the returned guilds.Cancels the enumeration before doing the next api request
public IAsyncEnumerable<DiscordGuild> GetGuildsBeforeAsync(ulong before, int limit = 200, bool? withCount = null, CancellationToken cancellationToken = default)

Parameters

before ulong
limit int
withCount bool?
cancellationToken CancellationToken

Returns

IAsyncEnumerable<DiscordGuild>

Exceptions

BadRequestException

Thrown when an invalid parameter was provided.

ServerErrorException

Thrown when Discord is unable to process the request.