Skip to main content
Module

x/discord_rpc_deno/mod.ts>ClientUser

port of @xhayper/discord-rpc to deno
Go to Latest
class ClientUser
extends User
Re-export
import { ClientUser } from "https://deno.land/x/discord_rpc_deno@v1.0.25/mod.ts";

Methods

clearActivity(pid?: number): Promise<void>

Used to clear a user's Rich Presence.

closeJoinRequest(userId: string): Promise<void>

Used to reject an Ask to Join request.

connectToLobby(lobbyId: string, secret: string): Promise<Lobby>

Used to join a new lobby.

createLobby(
type: LobbyType,
capacity?: number,
locked?: boolean,
metadata?: any,
): Promise<Lobby>

Create a new lobby

fetchChannel(channelId: string): Promise<Channel>

Used to get a channel the client is in.

fetchChannels(guildId: string): Promise<Channel>

Used to get a guild's channels the client is in.

fetchGuild(guildId: string, timeout?: number): Promise<Guild>

Used to get a guild the client is in.

fetchGuilds(): Promise<Guild[]>

Used to get a list of guilds the client is in.

fetchUser(userId: string): Promise<User>
getImage(
userId: string,
format?: "png" | "webp" | "jpg",
size?:
| 16
| 32
| 64
| 128
| 256
| 512
| 1024
,
): Promise<string>

Used to get a user's avatar

getRelationships(): Promise<Array<User>>
getSelectedVoiceChannel(): Promise<Channel | null>

Used to get the client's current voice channel. There are no arguments for this command. Returns the Get Channel response, or null if none.

Used to get current client's voice settings

leaveTextChannel(timeout?: number): Promise<void>

Used to leave text channels, group dms, or dms.

leaveVoiceChannel(timeout?: number, force?: boolean): Promise<void>

Used to leave voice channels, group dms, or dms

selectTextChannel(channelId: string, timeout?: number): Promise<Channel | null>

Used to join text channels, group dms, or dms. Returns the Get Channel response, or null if none.

selectVoiceChannel(
channelId: string,
timeout?: number,
force?: boolean,
): Promise<Channel>

Used to join voice channels, group dms, or dms. Returns the Get Channel response, null if none.

sendJoinInvite(userId: string): Promise<void>

Used to accept an Ask to Join request.

sendToLobby(lobbyId: string, data: string): Promise<Lobby>

Used to join a new lobby.

setActivity(activity: SetActivity, pid?: number): Promise<SetActivityResponse>

Used to update a user's Rich Presence.

setCeritfiedDevices(devices: CertifiedDevice[]): Promise<void>

Used by hardware manufacturers to send information about the current state of their certified devices that are connected to Discord.

setVoiceSettings(voiceSettings: Partial<VoiceSettings>): Promise<VoiceSettings>

Used to change voice settings of users in voice channels