Merge pull request #28 from Tropicallism/main
I hope it will work fine :))
This commit is contained in:
		@@ -1,14 +1,17 @@
 | 
				
			|||||||
'use strict';
 | 
					'use strict';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const CachedManager = require('./CachedManager');
 | 
				
			||||||
const { default: Collection } = require('@discordjs/collection');
 | 
					const { default: Collection } = require('@discordjs/collection');
 | 
				
			||||||
const { Error, TypeError } = require('../errors/DJSError');
 | 
					const { Error, TypeError } = require('../errors/DJSError');
 | 
				
			||||||
const { remove } = require('lodash');
 | 
					const { remove } = require('lodash');
 | 
				
			||||||
const { localeObject, DMScanLevel, stickerAnimationMode } = require('../util/Constants')
 | 
					const { localeObject, DMScanLevel, stickerAnimationMode } = require('../util/Constants')
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * Manages API methods for users.
 | 
					 * Manages API methods for users and stores their cache.
 | 
				
			||||||
 | 
					 * @extends {CachedManager}
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
class ClientUserSettingManager {
 | 
					class ClientUserSettingManager extends CachedManager {
 | 
				
			||||||
	constructor(client, iterable) {
 | 
						constructor(client, iterable) {
 | 
				
			||||||
		this.client = client;
 | 
							super(client);
 | 
				
			||||||
		// Raw data
 | 
							// Raw data
 | 
				
			||||||
		this.rawSetting = {};
 | 
							this.rawSetting = {};
 | 
				
			||||||
		// Language
 | 
							// Language
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,14 +3,14 @@
 | 
				
			|||||||
const { Collection } = require('@discordjs/collection');
 | 
					const { Collection } = require('@discordjs/collection');
 | 
				
			||||||
const CachedManager = require('./CachedManager');
 | 
					const CachedManager = require('./CachedManager');
 | 
				
			||||||
const { Error } = require('../errors');
 | 
					const { Error } = require('../errors');
 | 
				
			||||||
const { User } = require('discord.js-selfbot-v13');
 | 
					const Discord = require("discord.js-selfbot-v13")
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * Manages API methods for users who reacted to a reaction and stores their cache.
 | 
					 * Manages API methods for users who reacted to a reaction and stores their cache.
 | 
				
			||||||
 * @extends {CachedManager}
 | 
					 * @extends {CachedManager}
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
class ReactionUserManager extends CachedManager {
 | 
					class ReactionUserManager extends CachedManager {
 | 
				
			||||||
  constructor(reaction, iterable) {
 | 
					  constructor(reaction, iterable) {
 | 
				
			||||||
    super(reaction.client, User, iterable);
 | 
					    super(reaction.client, Discord.User, iterable);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * The reaction that this manager belongs to
 | 
					     * The reaction that this manager belongs to
 | 
				
			||||||
@@ -21,7 +21,7 @@ class ReactionUserManager extends CachedManager {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  /**
 | 
					  /**
 | 
				
			||||||
   * The cache of this manager
 | 
					   * The cache of this manager
 | 
				
			||||||
   * @type {Collection<Snowflake, User>}
 | 
					   * @type {Collection<Snowflake, Discord.User>}
 | 
				
			||||||
   * @name ReactionUserManager#cache
 | 
					   * @name ReactionUserManager#cache
 | 
				
			||||||
   */
 | 
					   */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -35,7 +35,7 @@ class ReactionUserManager extends CachedManager {
 | 
				
			|||||||
  /**
 | 
					  /**
 | 
				
			||||||
   * Fetches all the users that gave this reaction. Resolves with a collection of users, mapped by their ids.
 | 
					   * Fetches all the users that gave this reaction. Resolves with a collection of users, mapped by their ids.
 | 
				
			||||||
   * @param {FetchReactionUsersOptions} [options] Options for fetching the users
 | 
					   * @param {FetchReactionUsersOptions} [options] Options for fetching the users
 | 
				
			||||||
   * @returns {Promise<Collection<Snowflake, User>>}
 | 
					   * @returns {Promise<Collection<Snowflake, Discord.User>>}
 | 
				
			||||||
   */
 | 
					   */
 | 
				
			||||||
  async fetch({ limit = 100, after } = {}) {
 | 
					  async fetch({ limit = 100, after } = {}) {
 | 
				
			||||||
    const message = this.reaction.message;
 | 
					    const message = this.reaction.message;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -13,7 +13,7 @@ let VoiceChannel;
 | 
				
			|||||||
const { ChannelTypes, ThreadChannelTypes, VoiceBasedChannelTypes } = require('../util/Constants');
 | 
					const { ChannelTypes, ThreadChannelTypes, VoiceBasedChannelTypes } = require('../util/Constants');
 | 
				
			||||||
const SnowflakeUtil = require('../util/SnowflakeUtil');
 | 
					const SnowflakeUtil = require('../util/SnowflakeUtil');
 | 
				
			||||||
const { Message } = require('discord.js');
 | 
					const { Message } = require('discord.js');
 | 
				
			||||||
const { ApplicationCommand } = require('discord.js-selfbot-v13');
 | 
					//const { ApplicationCommand } = require('discord.js-selfbot-v13'); - Not being used in this file, not necessary.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * @type {WeakSet<Channel>}
 | 
					 * @type {WeakSet<Channel>}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -156,8 +156,7 @@ class ClientUser extends User {
 | 
				
			|||||||
	async setHypeSquad(type) {
 | 
						async setHypeSquad(type) {
 | 
				
			||||||
		const id = typeof type === 'string' ? HypeSquadOptions[type] : type;
 | 
							const id = typeof type === 'string' ? HypeSquadOptions[type] : type;
 | 
				
			||||||
		if (!id && id !== 0) throw new Error('Invalid HypeSquad type.');
 | 
							if (!id && id !== 0) throw new Error('Invalid HypeSquad type.');
 | 
				
			||||||
		if (id !== 0)
 | 
							if (id !== 0) return await this.client.api.hypesquad.online.post({
 | 
				
			||||||
			return await this.client.api.hypesquad.online.post({
 | 
					 | 
				
			||||||
			data: { house_id: id },
 | 
								data: { house_id: id },
 | 
				
			||||||
		});
 | 
							});
 | 
				
			||||||
		else return await this.client.api.hypesquad.online.delete();
 | 
							else return await this.client.api.hypesquad.online.delete();
 | 
				
			||||||
@@ -179,8 +178,7 @@ class ClientUser extends User {
 | 
				
			|||||||
	 * @returns {Promise}
 | 
						 * @returns {Promise}
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	setDiscriminator(discriminator, password) {
 | 
						setDiscriminator(discriminator, password) {
 | 
				
			||||||
		if (!this.nitro)
 | 
							if (!this.nitro) throw new Error('You must be a Nitro User to change your discriminator.');
 | 
				
			||||||
			throw new Error('You must be a Nitro User to change your discriminator.');
 | 
					 | 
				
			||||||
		if (!password && !this.client.password)
 | 
							if (!password && !this.client.password)
 | 
				
			||||||
			throw new Error('A password is required to change a discriminator.');
 | 
								throw new Error('A password is required to change a discriminator.');
 | 
				
			||||||
		return this.edit({
 | 
							return this.edit({
 | 
				
			||||||
@@ -354,22 +352,6 @@ class ClientUser extends User {
 | 
				
			|||||||
	setAFK(afk = true, shardId) {
 | 
						setAFK(afk = true, shardId) {
 | 
				
			||||||
		return this.setPresence({ afk, shardId });
 | 
							return this.setPresence({ afk, shardId });
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					 | 
				
			||||||
	/**
 | 
					 | 
				
			||||||
	 * Send Friend Request to the user
 | 
					 | 
				
			||||||
	 * @returns {Promise<User>} the user object
 | 
					 | 
				
			||||||
	 */
 | 
					 | 
				
			||||||
	async findFriend(username, discriminator) {
 | 
					 | 
				
			||||||
		return await this.client.api
 | 
					 | 
				
			||||||
			.users('@me')
 | 
					 | 
				
			||||||
			.relationships.post({
 | 
					 | 
				
			||||||
				data: {
 | 
					 | 
				
			||||||
					username: username,
 | 
					 | 
				
			||||||
					discriminator: parseInt(discriminator),
 | 
					 | 
				
			||||||
				},
 | 
					 | 
				
			||||||
			})
 | 
					 | 
				
			||||||
			.then((_) => _);
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
module.exports = ClientUser;
 | 
					module.exports = ClientUser;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -20,7 +20,7 @@ const Permissions = require('../util/Permissions');
 | 
				
			|||||||
const SnowflakeUtil = require('../util/SnowflakeUtil');
 | 
					const SnowflakeUtil = require('../util/SnowflakeUtil');
 | 
				
			||||||
const Util = require('../util/Util');
 | 
					const Util = require('../util/Util');
 | 
				
			||||||
const { findBestMatch } = require('string-similarity'); // not check similarity
 | 
					const { findBestMatch } = require('string-similarity'); // not check similarity
 | 
				
			||||||
const { ApplicationCommand } = require('discord.js-selfbot-v13');
 | 
					//const { ApplicationCommand } = require('discord.js-selfbot-v13'); - Not being used in this file, not necessary.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * @type {WeakSet<Message>}
 | 
					 * @type {WeakSet<Message>}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -183,7 +183,6 @@ class MessageButton extends BaseMessageComponent {
 | 
				
			|||||||
            component_type: 2, // Button
 | 
					            component_type: 2, // Button
 | 
				
			||||||
            custom_id: this.customId
 | 
					            custom_id: this.customId
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          message_flags: message.flags.bitfield,
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    )
 | 
					    )
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -231,7 +231,8 @@ class MessageSelectMenu extends BaseMessageComponent {
 | 
				
			|||||||
      return false;
 | 
					      return false;
 | 
				
			||||||
    })
 | 
					    })
 | 
				
			||||||
    if (check_) throw new RangeError("[SELECT_MENU_INVALID_VALUE] The value " + check_ + " is invalid. Please use a valid value " + validValue.join(', '));
 | 
					    if (check_) throw new RangeError("[SELECT_MENU_INVALID_VALUE] The value " + check_ + " is invalid. Please use a valid value " + validValue.join(', '));
 | 
				
			||||||
    await message.client.api.interactions.post({
 | 
					    await message.client.api.interactions.post(
 | 
				
			||||||
 | 
					      {
 | 
				
			||||||
        data: {
 | 
					        data: {
 | 
				
			||||||
          type: 3, // ?
 | 
					          type: 3, // ?
 | 
				
			||||||
          guild_id: message.guild?.id ?? null, // In DMs
 | 
					          guild_id: message.guild?.id ?? null, // In DMs
 | 
				
			||||||
@@ -245,9 +246,9 @@ class MessageSelectMenu extends BaseMessageComponent {
 | 
				
			|||||||
            type: 3, // Select Menu
 | 
					            type: 3, // Select Menu
 | 
				
			||||||
            values,
 | 
					            values,
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
				message_flags: message.flags.bitfield,
 | 
					        }
 | 
				
			||||||
			},
 | 
					      }
 | 
				
			||||||
		});
 | 
					    )
 | 
				
			||||||
    return true;
 | 
					    return true;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,18 +1,13 @@
 | 
				
			|||||||
'use strict';
 | 
					'use strict';
 | 
				
			||||||
const axios = require('axios');
 | 
					const axios = require('axios');
 | 
				
			||||||
const baseURL = 'https://embed.benny.fun/?'; // error, not working .-. sad ...
 | 
					const baseURL = 'https://embed.benny.fun/?';
 | 
				
			||||||
const hiddenCharter =
 | 
					const hiddenCharter =
 | 
				
			||||||
    '||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||';
 | 
					    '||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||';
 | 
				
			||||||
const { RangeError } = require('../errors');
 | 
					const { RangeError } = require('../errors');
 | 
				
			||||||
const Util = require('../util/Util');
 | 
					const Util = require('../util/Util');
 | 
				
			||||||
const process = require('node:process');
 | 
					 | 
				
			||||||
const warn = true;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
class WebEmbed {
 | 
					class WebEmbed {
 | 
				
			||||||
    constructor(data = {}) {
 | 
					    constructor(data = {}) {
 | 
				
			||||||
        if (warn) process.emitWarning(
 | 
					 | 
				
			||||||
					'The WebEmbed constructor encountered a problem with the URL.',
 | 
					 | 
				
			||||||
				);
 | 
					 | 
				
			||||||
        this._setup(data);
 | 
					        this._setup(data);
 | 
				
			||||||
        /**
 | 
					        /**
 | 
				
			||||||
         * Shorten the link
 | 
					         * Shorten the link
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user