GlobalClient

A REST client for a user and their discord-wide content

Parameters

client

The REST client implementation

Constructors

Link copied to clipboard
constructor(client: RestClient)

Functions

Link copied to clipboard
suspend fun createDM(createDM: CreateDM): Channel

Open a DM channel between the current user and another.

Link copied to clipboard
suspend fun createGuild(guild: CreateGuild): Guild

Create a guild.

Link copied to clipboard
open suspend override fun DELETE(majorPath: String, minorPath: String, rateKey: String, block: HttpRequestBuilder.() -> Unit): HttpResponse
Link copied to clipboard
suspend fun deleteInvite(inviteCode: String)

Delete an invite.

Link copied to clipboard
open suspend override fun GET(majorPath: String, minorPath: String, rateKey: String, block: HttpRequestBuilder.() -> Unit): HttpResponse
Link copied to clipboard

Fetches all guilds from the GuildClient over potentially multiple API calls

Link copied to clipboard
suspend fun getApiGateway(): GatewayUrl

Get the gateway url from the API.

Link copied to clipboard

Get the bot specific gateway information from the API.

Link copied to clipboard
suspend fun getDMs(): List<Channel>

Get the DM channels this user is in.

Link copied to clipboard
suspend fun getGuilds(limit: Int = 100, before: String? = null, after: String? = null): List<PartialGuild>

Get a list of guilds that the current user is in.

Link copied to clipboard
suspend fun getInvite(inviteCode: String): Invite

Get an invite.

Link copied to clipboard
suspend fun getSticker(stickerId: String): Sticker

Get a specific sticker by sticker ID.

Link copied to clipboard

Get a list of all sticker packs available to Nitro users.

Link copied to clipboard
suspend fun getUser(userId: String = "@me"): User

Get a user.

Link copied to clipboard

Get all connections to a given user.

Link copied to clipboard

Get the voice regions available for creating a guild.

Link copied to clipboard
suspend fun modifyUser(user: ModifyUser): User

Modify the current user.

Link copied to clipboard
open suspend override fun PATCH(majorPath: String, minorPath: String, rateKey: String, omitNulls: Boolean, block: HttpRequestBuilder.() -> Unit): HttpResponse
Link copied to clipboard
open suspend override fun POST(majorPath: String, minorPath: String, rateKey: String, omitNulls: Boolean, block: HttpRequestBuilder.() -> Unit): HttpResponse
Link copied to clipboard
open suspend override fun PUT(majorPath: String, minorPath: String, rateKey: String, omitNulls: Boolean, block: HttpRequestBuilder.() -> Unit): HttpResponse