seyfert
Version:
The most advanced framework for discord bots
40 lines (39 loc) • 1.45 kB
TypeScript
import type { ClientUserStructure } from '../client';
import type { UsingClient } from '../commands';
import type { GatewayReadyDispatchData, RESTPatchAPICurrentUserJSONBody } from '../types';
import { User } from './User';
/**
* Represents a client user that extends the base User class.
* This class is used to interact with the authenticated user.
*
* @extends User
*/
export declare class ClientUser extends User {
readonly application: GatewayReadyDispatchData['application'];
/**
* Indicates if the user is a bot.
* @type {true}
*/
bot: boolean;
/**
* Creates an instance of ClientUser.
*
* @param client - The client instance used for making API requests.
* @param data - The user data received from the gateway.
* @param application - The application data received from the gateway.
*/
constructor(client: UsingClient, data: GatewayReadyDispatchData['user'], application: GatewayReadyDispatchData['application']);
/**
* Fetches the current user data from the API.
*
* @returns A promise that resolves to the ClientUserStructure.
*/
fetch(): Promise<ClientUserStructure>;
/**
* Edits the current user data.
*
* @param body - The data to update the user with.
* @returns A promise that resolves to the updated ClientUserStructure.
*/
edit(body: RESTPatchAPICurrentUserJSONBody): Promise<ClientUserStructure>;
}