Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/higa/deno/client/managers/UserManager.ts>UserManager

A package to interract with the Discord API coded by myself
Latest
class UserManager
import { UserManager } from "https://deno.land/x/higa@0.1.2/deno/client/managers/UserManager.ts";

Constructors

new
UserManager(
token: string,
tokenType: string,
version: APIVersions,
)

Properties

readonly
version: APIVersions

API Version

Methods

createDM(options: CreateDMOptions): Promise<Channel>

Create a DM channel with another user

It creates a group DM channel with the users specified in the access_tokens array

getCurrentUser(): Promise<User>

Get current user

getCurrentUserGuildMember(guildID: string): Promise<GuildMember>

Get the current user's guild member object

getCurrentUserGuilds(options: GetCurrentUserGuildsOptions): Promise<Guild[]>

Get the current user's guilds

getUser(userID: string): Promise<User>

It makes a GET request to the Discord API to get the user with the given ID

It gets the current user's connections

leaveGuild(guildID: string): Promise<void>

It leaves a guild.

It modifies the current user's data