From f9fbcb34d30e08a15bd36656c820fd055f2c8c76 Mon Sep 17 00:00:00 2001 From: Elysia <71698422+aiko-chan-ai@users.noreply.github.com> Date: Sun, 7 Jan 2024 20:18:42 +0700 Subject: [PATCH] v2.15.1 --- package.json | 2 +- src/structures/interfaces/TextBasedChannel.js | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index b1c9830..0eebab3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "discord.js-selfbot-v13", - "version": "2.15.1", + "version": "2.15.0", "description": "A unofficial discord.js fork for creating selfbots [Based on discord.js v13]", "main": "./src/index.js", "types": "./typings/index.d.ts", diff --git a/src/structures/interfaces/TextBasedChannel.js b/src/structures/interfaces/TextBasedChannel.js index 4e64c34..11da672 100644 --- a/src/structures/interfaces/TextBasedChannel.js +++ b/src/structures/interfaces/TextBasedChannel.js @@ -498,11 +498,8 @@ class TextBasedChannel { } if (user._partial) await user.getProfile().catch(() => {}); if (!commandName || typeof commandName !== 'string') throw new Error('Command name is required'); - const API = - this.client.api[this.guild ? 'guilds' : 'channels'][this.guild?.id || this.id]['application-command-index']; - const data = await API.get(); + const data = await this.searchInteraction(user.application?.id ?? user.id, 'CHAT_INPUT'); for (const command of data.application_commands) { - if (command.type !== 1) continue; if (user.id == command.application_id || user.application.id == command.application_id) { user.application?.commands?._add(command, true); }