Method GetInvite
| Improve this Doc View SourceGetInvite(string, bool?)
Gets an invite by its code.
Declaration
public Task<DiscordInvite> GetInvite(string inviteCode, bool? withCounts = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | inviteCode | |
| bool? | withCounts | Whether the returned invite should contain approximate member counts. |
Returns
| Type | Description |
|---|---|
| Task<DiscordInvite> |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | Thrown if the invite code is empty or only contains whitespace characters. |
| ArgumentNullException | |
| DiscordHttpApiException |