From d5a0b94288b1d3f967c1303c8fa8196e3142dc48 Mon Sep 17 00:00:00 2001 From: March 7th <71698422+aiko-chan-ai@users.noreply.github.com> Date: Wed, 14 Sep 2022 12:12:58 +0700 Subject: [PATCH] fix get Profile user error --- src/structures/interfaces/TextBasedChannel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structures/interfaces/TextBasedChannel.js b/src/structures/interfaces/TextBasedChannel.js index 6f869db..36f7257 100644 --- a/src/structures/interfaces/TextBasedChannel.js +++ b/src/structures/interfaces/TextBasedChannel.js @@ -437,7 +437,7 @@ class TextBasedChannel { if (!user || !user.bot || !user.application) { throw new Error('botId is not a bot or does not have an application slash command'); } - if (user._partial) await user.getProfile(); + if (user._partial) await user.getProfile().catch(() => {}); if (!commandName || typeof commandName !== 'string') throw new Error('Command name is required'); // Using API to search (without opcode ~ehehe) // https://discord.com/api/v9/channels/id/application-commands/search?type=1&application_id=161660517914509312