DiscordClient
Namespace: Discord
Properties
Name
Description
Type
HttpClient
Used for making REST requests
DiscordHttpClient
User
The client's current user
DiscordClientUser
Token
The client's current token
string
Config
The client's configuration
LockedDiscordConfig
Proxy
A proxy client created from the config
ProxyClient
Methods
All methods documented here are ones that cannot be put into objects/"models". The other methods already have documentation within their objects.
Constructor
Parameters
Name
Description
Type
config
Your desired configuration for the client
DiscordConfig?
Constructor
Parameters
Name
Description
Type
token
Your desired auth token
string
config
Your desired configuration for the client
DiscordConfig?
RequestPasswordReset
Requests a password reset for an account.
Parameters
Name
Description
Type
The target account's email. If this parameter is not supplied, the client's current user's email will be chosen
string?
GetPayments
Gets a list of payments the current user has made.
Parameters
Name
Description
Type
limit
Max amount of payments to receive
int?
Returns
A list of
GetPaymentMethods
Gets the current user's payment methods.
Returns
A list of
GetChannel
Gets a channel.
Parameters
Name
Description
Type
channelId
ID of the channel
ulong
Returns
GetPrivateChannels
Gets all the current user's private channels (DM's).
Returns
A list of
CreateDM
Creates a private channel with the recipient. If a channel already exists, that one will be returned instead.
Parameters
Name
Description
Type
recipientId
ID of the target user
ulong
Returns
JoinGroup
Joins a group by an invite.
Parameters
Name
Description
Type
inviteCode
The group's invite code
string
Returns
CreateGroup
Creates a group.
Parameters
Name
Description
Type
recipients
The users to add to the group
List<ulong>
Returns
QueryGuilds
Quries public guilds (in the 'Explore Public Servers' tab).
Parameters
Name
Description
Type
options
Optional arguments to apply when querying
GuildQueryOptions
Returns
JoinGuild
Joins a lurkable guild.
Parameters
Name
Description
Type
guildId
ID of the guild
ulong
Returns
GetGiftInventory
Gets the current user's gifts.
Returns
A list of
QueryGiftCodes
Queries the current user's gift codes.
Parameters
Name
Description
Type
skuId
The sku to look for
ulong
subPlanId
The subscription plan to look for
ulong
Returns
A list of
CreateGiftCode
Creates a new gift code. This will only work if you have gifts in your Gift Inventory that don't have any pre-existing codes.
Parameters
Name
Description
Type
skuId
The sku to make a code for
ulong
subPlanId
The subscription plan to go along with the sku
ulong
Returns
GetNitroGift
Gets a nitro gift.
Parameters
Name
Description
Type
code
The gift's code
string
Returns
SetPrivateChannelSettings
Updates the current user's PM settings.
Parameters
Name
Description
Type
channels
The channel settings
Dictionary<ulong, ChannelSettingsProperties>
Returns
A list of
CreateTemplatedGuild
Creates a guild from a template.
Parameters
Name
Description
Type
templateCode
The template's code
string
name
Your new guild's name
string
icon
Your new guild's icon
DiscordImage?
CreateGuild
Creates a new guild.
Parameters
Name
Description
Type
name
The name you want the guild to have
string
icon
The icon you want your guild to have
DiscordImage?
region
The ID of the region you want your guild to have
string?
Returns
GetGuilds
Gets the current user's guilds.
Parameters
Name
Description
Type
limit
Max amount of guilds to get
uint?
afterId
Get guilds after this ID
ulong?
Returns
A list of
GetGuild
Gets a guild the current user is in.
Parameters
Name
Description
Type
guildId
ID of the guild
ulong
Returns
JoinGuild
Joins a guild using an invite.
Parameters
Name
Description
Type
invCode
The invite code (example: 'kUDXav')
string
Returns
GetGoLivePreview
Gets the preview image of a Go Live stream. This has not been put into any objects yet, which is why it's here.
Parameters
Name
Description
Type
guildId
The guild in which the user is streaming
ulong
channelId
The voice channel where the user is streaming
ulong
userId
The target user
ulong
Returns
Image
GetInvite
Gets information about an invite from it's code.
Parameters
Name
Description
Type
invCode
The invite's code
string
Returns
GetWebhook
Gets a webhook.
Parameters
Name
Description
Type
webhookId
The webhook's ID
ulong
token
The token associated with the webhook. Pass this if you're not admin in the guild
string?
Returns
AcknowledgeMessage
Acknowledges a message.
Parameters
Name
Description
Type
channelId
The channel containing the message
ulong
messageId
The target message
ulong
previousToken
If you have the previous ack token stored, send it here. Otherwise null is fine
string
Returns
An ack token (string), which can be used for future message acknowledgements.
GetAuthorizedApps
Gets the current user's "Authorized Apps".
Returns
A list of
AuthorizeApp
Authorizes an app to the user.
Parameters
Name
Description
Type
appId
The app you want to authorize
ulong
scope
string
Returns
The developer's chosen redirect url (string)
GetApplications
Gets the current user's apps.
Returns
A list of
GetApplication
Gets one of the current user's applications.
Parameters
Name
Description
Type
id
Your app's ID
ulong
Returns
CreateApplication
Creates a new app.
Parameters
Name
Description
Type
name
The name you want for your app
string
Returns
GetRelationships
Gets the current user's relationships.
Returns
A list of
SendFriendRequest
Sends a friend request using the target's username#discriminator.
Parameters
Name
Description
Type
username
The target's username
string
discriminator
The target's discriminator (tag)
uint
SendFriendRequest
Sends a friend request using the target's ID.
Parameters
Name
Description
Type
userId
Your target's user ID
ulong
BlockUser
Blocks a user.
Parameters
Name
Description
Type
userId
Your target's user ID
ulong
GetMutualFriends
Gets the mutual friends between the current user and the specified target.
Parameters
Name
Description
Type
userId
Your target's user ID
long (this'll be a ulong in the future)
Returns
A list of
BoostGuild
Boosts a guild with a list of boost slots.
Parameters
Name
Description
Type
guildId
ID of the guild you want to boost
ulong
boosts
The slots you want to boost the server with
IEnumerable<ulong>
Returns
A list of
GetNitroBoosts
Gets the user's nitro boost slots.
Returns
A list of
PurchaseGuildBoost
Purchases guild boosts.
Parameters
Name
Description
Type
paymentMethodId
The payment method to buy them with
ulong
quantity
The amount of boosts to buy
int?
Returns
GetActiveSubscription
Gets the current user's active subscription, if any.
Returns
A list of
AddPlanToSubscription
Adds a plan to an already-existing subscription.
Parameters
Name
Description
Type
paymentMethodId
ID of the payment method you want to buy it with
ulong
subscriptionPlanId
The already-existing subscription
ulong
planId
ID of the plan you want to buy
ulong
quantity
The amount of this plan you want to buy
int?
Returns
PurchaseSubscription
Purchases a new subscription.
Parameters
Name
Description
Type
paymentMethodId
ID of the payment method to buy it with
ulong
skuId
The plan's sku ID
ulong
additionalBoosts
Additional boosts to purchase
uint?
Returns
GetUser
Gets information about a user by it's ID.
Parameters
Name
Description
Type
userId
The user's ID
ulong
Returns
GetClientUser
Gets the client's own user.
Returns
GetConnectedAccounts
Gets the current user's connected accounts.
Returns
Ring
Rings a list of recipients in a group.
Parameters
Name
Description
Type
channelId
ID of the group
ulong
recipients
The users to ring
List<ulong>
StopRinging
Stops ringing a list of recipients in a group.
Parameters
Name
Description
Type
channelId
ID of the group
ulong
recipients
The users to stop ringing
List<ulong>
StartCall
Starts a call in a private channel. Make sure you also join the voice channel (DiscordSocketClient required) for this to show up.
Parameters
Name
Description
Type
channelId
ID of the private channel
ulong
DeclineCall
Declines an incoming call.
Parameters
Name
Description
Type
channelId
ID of the private channel
ulong
GetVoiceRegions
Gets a list of Discord's voice regions.
Returns
A list of
Last updated