HypeSquad
Created by catcat1204 Edited by aiko-chan-ai
This commit is contained in:
parent
7250fa2dbd
commit
a39bc31b58
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "discord.js-selfbot-v13",
|
||||
"version": "1.1.0",
|
||||
"version": "1.1.1",
|
||||
"description": "A unofficial discord.js fork for creating selfbots [Based on discord.js v13]",
|
||||
"main": "./src/index.js",
|
||||
"types": "./typings/index.d.ts",
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
const User = require('./User');
|
||||
const DataResolver = require('../util/DataResolver');
|
||||
const { HypeSquadOptions } = require('../util/Constants');
|
||||
|
||||
/**
|
||||
* Represents the logged in client's Discord user.
|
||||
@ -108,14 +109,19 @@ class ClientUser extends User {
|
||||
}
|
||||
/**
|
||||
* Set HyperSquad House
|
||||
* @param {number} id
|
||||
* @param {HypeSquadOptions<Number|String>} type
|
||||
* `HOUSE_BRAVERY`: 1
|
||||
* `HOUSE_BRILLIANCE`: 2
|
||||
* `HOUSE_BALANCE`: 3
|
||||
* @returns {Promise<void>}
|
||||
* @example
|
||||
* // Set HyperSquad House
|
||||
* client.user.setHyperSquadHouse(1);
|
||||
* // Set HyperSquad HOUSE_BRAVERY
|
||||
* client.user.setHypeSquad(1); || client.user.setHypeSquad('HOUSE_BRAVERY');
|
||||
*/
|
||||
setHypeSquad(id) {
|
||||
this.client.api.hypesquad.online.post({ data: {house_id: id} });
|
||||
async setHypeSquad(type) {
|
||||
const id = typeof type === 'string' ? HypeSquadOptions[type] : type;
|
||||
if(!id) throw new Error('Invalid HypeSquad type.');
|
||||
return await this.client.api.hypesquad.online.post({ data: {house_id: id} });
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1183,6 +1183,7 @@ exports.GuildScheduledEventStatuses = createEnum([null, 'SCHEDULED', 'ACTIVE', '
|
||||
*/
|
||||
exports.GuildScheduledEventEntityTypes = createEnum([null, 'STAGE_INSTANCE', 'VOICE', 'EXTERNAL']);
|
||||
/* eslint-enable max-len */
|
||||
exports.HypeSquadOptions = createEnum([null, 'HOUSE_BRAVERY', 'HOUSE_BRILLIANCE', 'HOUSE_BALANCE']);
|
||||
|
||||
exports._cleanupSymbol = Symbol('djsCleanup');
|
||||
|
||||
|
6
typings/enums.d.ts
vendored
6
typings/enums.d.ts
vendored
@ -103,6 +103,12 @@ export const enum GuildScheduledEventStatuses {
|
||||
CANCELED = 4,
|
||||
}
|
||||
|
||||
export const enum HypeSquadOptions {
|
||||
HOUSE_BRAVERY = 1,
|
||||
HOUSE_BRILLIANCE = 2,
|
||||
HOUSE_BALANCE = 3,
|
||||
}
|
||||
|
||||
export const enum InteractionResponseTypes {
|
||||
PONG = 1,
|
||||
CHANNEL_MESSAGE_WITH_SOURCE = 4,
|
||||
|
2
typings/index.d.ts
vendored
2
typings/index.d.ts
vendored
@ -636,7 +636,7 @@ export class ClientUser extends User {
|
||||
public setPresence(data: PresenceData): ClientPresence;
|
||||
public setStatus(status: PresenceStatusData, shardId?: number | number[]): ClientPresence;
|
||||
public setUsername(username: string): Promise<this>;
|
||||
public setHypeSquad(id: number): Promise<void>;
|
||||
public setHypeSquad(type: HypeSquadOptions<Number|String>): Promise<void>;
|
||||
// Selfbot
|
||||
public readonly nitro: boolean;
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user