WIP: v1.3.0-waittime #7

Draft
voidf1sh wants to merge 6 commits from v1.3.0-waittime into main
Showing only changes of commit d268f52237 - Show all commits

10
main.js
View File

@ -69,7 +69,7 @@ client.on('interactionCreate', async interaction => {
if (client.slashCommands.has(commandName)) {
client.slashCommands.get(commandName).execute(interaction);
} else {
interaction.reply('Sorry, I don\'t have access to that command.');
interaction.reply('Sorry, I don\'t have access to that command.').catch(e => console.err(e));
console.error('Slash command attempted to run but not found: ' + commandName);
}
}
@ -79,7 +79,7 @@ client.on('interactionCreate', async interaction => {
case 'refresh':
// console.log(JSON.stringify(interaction));
await fn.refresh(interaction).catch(err => {
interaction.channel.send(fn.builders.errorEmbed("Oops! Something went wrong!"));
interaction.channel.send(fn.builders.errorEmbed("Oops! Something went wrong!")).catch(e => console.err(e));
});
break;
case 'deleteping':
@ -103,10 +103,10 @@ client.on('interactionCreate', async interaction => {
}
} catch(err) {
if (err === "Guild doesn't exist in database!") {
interaction.channel.send(fn.builders.errorEmbed(strings.error.noGuild));
interaction.channel.send(fn.builders.errorEmbed(strings.error.noGuild)).catch(e => console.err(e));
console.error(err);
} else {
interaction.channel.send("Oops! An error occurred... Sorry about that, please contact my owner @vfsh if this keeps happening.");
interaction.channel.send("Oops! An error occurred... Sorry about that, please contact my owner @vfsh if this keeps happening.").catch(e => console.err(e));
console.error(err);
}
}
@ -117,7 +117,7 @@ client.on('messageUpdate', async (oldMessage, message) => {
await fn.messages.updateHandler(message).catch(async e => {
switch (e) {
case strings.error.noCompareMessage:
await message.channel.send(strings.error.noCompareMessage);
await message.channel.send(strings.error.noCompareMessage).catch(e => console.err(e));
break;
default:
break;