djs-selfbot-v13 3.7.14 → 3.7.15

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.14",
3
+ "version": "3.7.15",
4
4
  "description": "An unofficial discord.js fork for creating selfbots",
5
5
  "main": "./src/index.js",
6
6
  "types": "./typings/index.d.ts",
@@ -466,10 +466,10 @@ class ClientUser extends User {
466
466
 
467
467
  // Get current widgets first
468
468
  const currentWidgets = await this.widgetsList();
469
-
469
+
470
470
  // Find existing widget of this type or create new one
471
471
  let targetWidget = currentWidgets.widgets.find(w => w.data.type === type);
472
-
472
+
473
473
  if (!targetWidget) {
474
474
  // Create new widget if it doesn't exist
475
475
  targetWidget = {
@@ -488,7 +488,7 @@ class ClientUser extends User {
488
488
  const gameData = { game_id: gameId };
489
489
  if (comment !== null) gameData.comment = comment;
490
490
  if (tags.length > 0) gameData.tags = tags;
491
-
491
+
492
492
  targetWidget.data.games.push(gameData);
493
493
  }
494
494
 
@@ -516,7 +516,7 @@ class ClientUser extends User {
516
516
 
517
517
  // Get current widgets
518
518
  const currentWidgets = await this.widgetsList();
519
-
519
+
520
520
  if (gameId) {
521
521
  // Remove specific game from widget
522
522
  const targetWidget = currentWidgets.widgets.find(w => w.data.type === type);
@@ -611,7 +611,7 @@ class ClientUser extends User {
611
611
 
612
612
  const primaryColor = resolveColor(color1);
613
613
  const colors = [primaryColor];
614
-
614
+
615
615
  if (color2 !== null) {
616
616
  const secondaryColor = resolveColor(color2);
617
617
  colors.push(secondaryColor);
@@ -629,6 +629,44 @@ class ClientUser extends User {
629
629
  return this;
630
630
  }
631
631
 
632
+ /**
633
+ * Search messages across all DMs/GDMs using the tabs API.
634
+ * Supports pagination via offset.
635
+ * @param {Object} [options] Search options
636
+ * @param {string} [options.sortBy='timestamp'] Sort by ('timestamp' or 'relevance')
637
+ * @param {string} [options.sortOrder='desc'] Sort order ('asc' or 'desc')
638
+ * @param {number} [options.offset=0] Pagination offset
639
+ * @param {number} [options.limit=25] Results per page (max 25)
640
+ * @param {boolean} [options.trackExactTotal=true] Track exact total hits
641
+ * @returns {Promise<{ messages: Message[], total_results: number }>}
642
+ */
643
+ async searchTab(options = {}) {
644
+ const {
645
+ sortBy = 'timestamp',
646
+ sortOrder = 'desc',
647
+ offset = 0,
648
+ limit = 25,
649
+ trackExactTotal = true,
650
+ } = options;
651
+
652
+ const data = await this.client.api.users['@me'].messages.search.tabs.post({
653
+ data: {
654
+ tabs: {
655
+ messages: {
656
+ sort_by: sortBy,
657
+ sort_order: sortOrder,
658
+ author_id: [this.id],
659
+ offset,
660
+ limit: Math.min(limit, 25),
661
+ },
662
+ },
663
+ track_exact_total_hits: trackExactTotal,
664
+ },
665
+ });
666
+
667
+ return data;
668
+ }
669
+
632
670
  /**
633
671
  * Set the TAG of a guild.
634
672
  * @param {GuildIDResolve} guild The guild with the tag
@@ -637,7 +675,7 @@ class ClientUser extends User {
637
675
  setClan(guild) {
638
676
  const id = this.client.guilds.resolveId(guild);
639
677
  if (!id) throw new TypeError('INVALID_TYPE', 'guild', 'GuildResolvable');
640
-
678
+
641
679
  return this.client.api.users['@me'].clan.put({ data: { identity_guild_id: id, identity_enabled: true } });
642
680
  }
643
681
 
@@ -1034,6 +1034,7 @@ export class ClientUser extends User {
1034
1034
  public delWidget(type: WidgetType, gameId?: string): Promise<any>;
1035
1035
  public widgetsList(): Promise<WidgetsResponse>;
1036
1036
  public setNameStyle(fontName: FontName | number, effectName: EffectName | number, color1: number | string, color2?: number | string | null): Promise<this>;
1037
+ public searchTab(options?: UserMessageSearchTabOptions): Promise<{ messages: any[][]; total_results: number }>;
1037
1038
  }
1038
1039
 
1039
1040
  export class Options extends null {
@@ -1723,6 +1724,14 @@ export class Guild extends AnonymousGuild {
1723
1724
  public search(options?: GuildSearchOptions): Promise<any>;
1724
1725
  }
1725
1726
 
1727
+ export interface UserMessageSearchTabOptions {
1728
+ sortBy?: 'timestamp' | 'relevance';
1729
+ sortOrder?: 'desc' | 'asc';
1730
+ offset?: number;
1731
+ limit?: number;
1732
+ trackExactTotal?: boolean;
1733
+ }
1734
+
1726
1735
  export class GuildAuditLogs<T extends GuildAuditLogsResolvable = 'ALL'> {
1727
1736
  private constructor(guild: Guild, data: RawGuildAuditLogData);
1728
1737
  private webhooks: Collection<Snowflake, Webhook>;