UNPKG

dressed

Version:

A sleek, serverless-ready Discord bot framework.

40 lines (39 loc) 2.06 kB
import type { RESTGetAPICurrentUserApplicationRoleConnectionResult, RESTGetAPICurrentUserConnectionsResult, RESTGetAPICurrentUserGuildsQuery, RESTGetAPICurrentUserGuildsResult, RESTGetAPIUserResult, RESTPatchAPICurrentUserJSONBody, RESTPatchAPICurrentUserResult, RESTPostAPICurrentUserCreateDMChannelResult, RESTPutAPICurrentUserApplicationRoleConnectionJSONBody, RESTPutAPICurrentUserApplicationRoleConnectionResult, Snowflake } from "discord-api-types/v10"; /** * Returns a user object for a given user ID. * @param user The user to fetch (defaults to self) */ export declare function getUser(user?: Snowflake): Promise<RESTGetAPIUserResult>; /** * Modify the current user's account settings. * @param data The new user data */ export declare function modifyUser(data: RESTPatchAPICurrentUserJSONBody): Promise<RESTPatchAPICurrentUserResult>; /** * Returns a list of partial guild objects the current user is a member of. * @param options Optional parameters for the request */ export declare function listGuilds(options?: RESTGetAPICurrentUserGuildsQuery): Promise<RESTGetAPICurrentUserGuildsResult>; /** * Leave a guild. * @param guild The guild to leave */ export declare function leaveGuild(guild: Snowflake): Promise<void>; /** * Create a new DM channel with a user. * @param user The recipient to open a DM channel with */ export declare function createDM(user: Snowflake): Promise<RESTPostAPICurrentUserCreateDMChannelResult>; /** * Returns a list of connection objects. */ export declare function listConnections(): Promise<RESTGetAPICurrentUserConnectionsResult>; /** * Returns the application role connection for the user. */ export declare function getRoleConnection(): Promise<RESTGetAPICurrentUserApplicationRoleConnectionResult>; /** * Updates and returns the application role connection for the user. * @param data The new role connection data */ export declare function modifyRoleConnection(data: RESTPutAPICurrentUserApplicationRoleConnectionJSONBody): Promise<RESTPutAPICurrentUserApplicationRoleConnectionResult>;