djs-selfbot-v13 3.7.9 → 3.7.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "djs-selfbot-v13",
3
- "version": "3.7.9",
3
+ "version": "3.7.11",
4
4
  "description": "An unofficial discord.js fork for creating selfbots",
5
5
  "main": "./src/index.js",
6
6
  "types": "./typings/index.d.ts",
@@ -471,6 +471,35 @@ class Client extends BaseClient {
471
471
  return new Sticker(this, data);
472
472
  }
473
473
 
474
+ /**
475
+ * Fetches a user using a bot token.
476
+ * @param {UserResolvable} user The user to fetch
477
+ * @param {string} botToken The bot token to use for the request
478
+ * @returns {Promise<User>}
479
+ * @example
480
+ * client.fetchUserWithBot('123456789012345678', 'Bot YOUR_BOT_TOKEN')
481
+ * .then(user => console.log(`Fetched user: ${user.tag}`))
482
+ * .catch(console.error);
483
+ */
484
+ async fetchUserWithBot(user, botToken) {
485
+ const id = this.users.resolveId(user);
486
+ if (!id) throw new TypeError('INVALID_TYPE', 'user', 'UserResolvable');
487
+
488
+ // Clean the token (remove Bot prefix if present)
489
+ const cleanToken = botToken.replace(/^(Bot|Bearer)\s*/i, '');
490
+
491
+ // Make the API request with the provided bot token
492
+ const data = await this.api.users(id).get({
493
+ headers: {
494
+ Authorization: `Bot ${cleanToken}`
495
+ }
496
+ });
497
+
498
+ // Create and return the User object
499
+ const User = require('../structures/User');
500
+ return new User(this, data);
501
+ }
502
+
474
503
  /**
475
504
  * Obtains the list of sticker packs available to Nitro subscribers from Discord.
476
505
  * @returns {Promise<Collection<Snowflake, StickerPack>>}
@@ -196,18 +196,18 @@ class Options extends null {
196
196
  os: 'Windows',
197
197
  browser: 'Discord Client',
198
198
  release_channel: 'stable',
199
- client_version: '1.0.9210',
200
- os_version: '10.0.19044',
199
+ client_version: '1.0.9215',
200
+ os_version: '10.0.19045',
201
201
  os_arch: 'x64',
202
202
  app_arch: 'x64',
203
203
  system_locale: 'en-US',
204
204
  has_client_mods: false,
205
205
  client_launch_id: randomUUID(),
206
206
  browser_user_agent: UserAgent,
207
- browser_version: '35.3.0',
208
- os_sdk_version: '19044',
209
- client_build_number: 455964,
210
- native_build_number: 69976,
207
+ browser_version: '37.6.0',
208
+ os_sdk_version: '19045',
209
+ client_build_number: 471091,
210
+ native_build_number: 72186,
211
211
  client_event_source: null,
212
212
  launch_signature: randomUUID(),
213
213
  client_heartbeat_session_id: randomUUID(),
@@ -883,6 +883,7 @@ export class Client<Ready extends boolean = boolean> extends BaseClient {
883
883
  public fetchGuildTemplate(template: GuildTemplateResolvable): Promise<GuildTemplate>;
884
884
  public fetchVoiceRegions(): Promise<Collection<string, VoiceRegion>>;
885
885
  public fetchSticker(id: Snowflake): Promise<Sticker>;
886
+ public fetchUserWithBot(user: UserResolvable, botToken: string): Promise<User>;
886
887
  public fetchPremiumStickerPacks(): Promise<Collection<Snowflake, StickerPack>>;
887
888
  public fetchWebhook(id: Snowflake, token?: string): Promise<Webhook>;
888
889
  public fetchGuildWidget(guild: GuildResolvable): Promise<Widget>;