Class APIClient
APIClient
is the base abstraction for interacting with the Discord API.
Inherits from
-
Object
(base class)
Constructors
Name | Description |
---|---|
this
|
Fields
Name | Type | Description |
---|---|---|
baseURL
|
string |
|
client
|
Client |
|
log
|
std |
|
ratelimit
|
RateLimiter |
|
token
|
string |
|
userAgent
|
string |
Methods
Name | Description |
---|---|
bulkDeleteMessages
|
Deletes messages in bulk. |
deleteMessage
|
Deletes a message. |
editMessage
|
Edits a messages contents. |
gateway
|
Returns a valid Gateway Websocket URL |
guild
|
Returns a Guild for a Snowflake ID. |
guildChannels
|
Returns a list of channels for a Guild. |
guildDelete
|
Deletes a guild .
|
guildRemoveMember
|
Removes (kicks) a user from a Guild.
|
me
|
Return the User object for the currently logged in user .
|
meDMChannels
|
Returns a list of Channel objects for the current user .
|
meDMCreate
|
Creates a new DM for a recipient (user ) ID. Returns a Channel object.
|
meGuildLeave
|
Leaves a guild .
|
meGuilds
|
Returns a list of Guild objects for the current user .
|
meSettings
|
Modifies the current users settings. Returns a User object. |
requestJSON
|
Makes a HTTP request to the API (with empty body), returning an APIResponse |
requestJSON
|
Makes a HTTP request to the API (with JSON body), returning an APIResponse |
requestJSON
|
Makes a HTTP request to the API (with string body), returning an APIResponse |
sendMessage
|
Sends a message to a channel. |
user
|
Return a User object for a Snowflake ID. |