chore: bump version to 3.5.1

This commit is contained in:
Elysia
2025-01-21 14:24:35 +07:00
parent 171d7e5927
commit 6301bab181
3 changed files with 3 additions and 5 deletions

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
{ {
"name": "discord.js-selfbot-v13", "name": "discord.js-selfbot-v13",
"version": "3.5.0", "version": "3.5.1",
"description": "A unofficial discord.js fork for creating selfbots [Based on discord.js v13]", "description": "A unofficial discord.js fork for creating selfbots [Based on discord.js v13]",
"main": "./src/index.js", "main": "./src/index.js",
"types": "./typings/index.d.ts", "types": "./typings/index.d.ts",

View File

@@ -714,14 +714,12 @@ class Client extends BaseClient {
* @example * @example
* client.authorizeURL(`https://discord.com/api/oauth2/authorize?client_id=botID&permissions=8&scope=applications.commands%20bot`, { * client.authorizeURL(`https://discord.com/api/oauth2/authorize?client_id=botID&permissions=8&scope=applications.commands%20bot`, {
guild_id: "guildID", guild_id: "guildID",
permissions: "62221393", // your permissions
authorize: true
}) })
*/ */
authorizeURL(urlOAuth2, options = {}) { authorizeURL(urlOAuth2, options = {}) {
// ! throw new Error('METHOD_WARNING'); // ! throw new Error('METHOD_WARNING');
const url = new URL(urlOAuth2); const url = new URL(urlOAuth2);
if (!/https:\/\/(canary\.|ptb\.)?discord.com\/api(\/v\d{1,2})?\/oauth2\/authorize\?/.test(urlOAuth2)) { if (!/^https:\/\/(?:canary\.|ptb\.)?discord\.com(?:\/api(?:\/v\d{1,2})?)?\/oauth2\/authorize\?/.test(urlOAuth2)) {
throw new Error('INVALID_URL', urlOAuth2); throw new Error('INVALID_URL', urlOAuth2);
} }
const searchParams = Object.fromEntries(url.searchParams); const searchParams = Object.fromEntries(url.searchParams);