Merge pull request #191 from rfxct/fix/modal.reply-throwing-error

fix(Modal.reply): Remove exclamation mark
This commit is contained in:
Cinnamon 2022-07-08 21:35:44 +07:00 committed by GitHub
commit 5de442cfcf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -152,8 +152,7 @@ class Modal {
* })
*/
async reply(guildId, channelId, ...data) {
// Test
if (this.application) throw new Error('Modal cannot reply (Missing Application)');
if (!this.application) throw new Error('Modal cannot reply (Missing Application)');
const guild = this.client.guilds.cache.get(guildId);
if (!guild) throw new Error('GUILD_NOT_FOUND', `Guild ${guildId} not found`);
const channel = guild.channels.cache.get(channelId);