Skip to content

Commit

Permalink
v2.15.1
Browse files Browse the repository at this point in the history
i hate git
  • Loading branch information
aiko-chan-ai committed Jan 7, 2024
1 parent e469cdb commit aa8e0bf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "discord.js-selfbot-v13",
"version": "2.15.0",
"version": "2.15.1",
"description": "A unofficial discord.js fork for creating selfbots [Based on discord.js v13]",
"main": "./src/index.js",
"types": "./typings/index.d.ts",
Expand Down
5 changes: 4 additions & 1 deletion src/structures/interfaces/TextBasedChannel.js
Original file line number Diff line number Diff line change
Expand Up @@ -498,8 +498,11 @@ class TextBasedChannel {
}
if (user._partial) await user.getProfile().catch(() => {});
if (!commandName || typeof commandName !== 'string') throw new Error('Command name is required');
const data = await this.searchInteraction(user.application?.id ?? user.id, 'CHAT_INPUT');
const API =
this.client.api[this.guild ? 'guilds' : 'channels'][this.guild?.id || this.id]['application-command-index'];
const data = await API.get();
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);
}
Expand Down

0 comments on commit aa8e0bf

Please sign in to comment.