chore(release): version

This commit is contained in:
Cinnamon
2022-06-26 13:40:26 +07:00
parent c097deeab4
commit 736238f3df
11 changed files with 78 additions and 29 deletions

View File

@@ -402,7 +402,7 @@ class TextBasedChannel {
if (!botId) throw new Error('Bot ID is required');
// ? maybe ...
const user = await this.client.users.fetch(botId).catch(() => {});
if (!user || !user.bot || !user.applications) {
if (!user || !user.bot || !user.application) {
throw new Error('botId is not a bot or does not have an application slash command');
}
if (!commandName || typeof commandName !== 'string') throw new Error('Command name is required');
@@ -425,7 +425,7 @@ class TextBasedChannel {
if (command.name == commandName) commandTarget = c;
} else {
const tempUser = this.client.users.cache.get(command.application_id);
if (tempUser && tempUser.bot && tempUser.applications) {
if (tempUser && tempUser.bot && tempUser.application) {
tempUser.application?.commands?._add(command, true);
}
}