mirror of
https://github.com/PretendoNetwork/Yamamura.git
synced 2024-06-12 01:27:22 -04:00
throw exceptions instead of direct replies
This commit is contained in:
parent
088ca51fcd
commit
8b76b06381
|
@ -63,11 +63,7 @@ async function modApplicationHandler(interaction) {
|
|||
const channel = channelId && guild.channels.fetch(channelId);
|
||||
|
||||
if (!channel) {
|
||||
await interaction.editReply({
|
||||
content: 'application failed to submit - channel not setup!',
|
||||
ephemeral: true
|
||||
});
|
||||
return;
|
||||
throw new Error('application failed to submit - channel not setup!');
|
||||
}
|
||||
|
||||
const modApplicationEmbed = new Discord.MessageEmbed();
|
||||
|
|
|
@ -47,11 +47,7 @@ async function reportUserHandler(interaction) {
|
|||
const reportsChannel = channels.find(channel => channel.id === db.getDB().get('report.channel.log'));
|
||||
|
||||
if (!reportsChannel) {
|
||||
await interaction.editReply({
|
||||
content: 'Report failed to submit - channel not setup',
|
||||
ephemeral: true
|
||||
});
|
||||
return;
|
||||
throw new Error('Report failed to submit - channel not setup');
|
||||
}
|
||||
|
||||
const reportEmbed = new Discord.MessageEmbed();
|
||||
|
|
Loading…
Reference in a new issue