fix get Profile user error

This commit is contained in:
March 7th 2022-09-14 12:12:58 +07:00
parent ad9d8cc229
commit d5a0b94288

View File

@ -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