fix: remove Promise.resolve() return and fix queue type

This commit is contained in:
Marius Begby committed 2023-08-29 15:04:37 +02:00
1 parent d5cc5b8741
commit 67e45729a3
23 files changed
+102 -117

No files matched your search

+2 -2
View File
@@ -15,7 +15,7 @@ export const postBotStats = async ({ client, executionId }: PostBotStatsParams)
try {
if (client.shard?.ids[0] !== 0) {
return Promise.resolve();
return;
}
let guildCount = 0;
@@ -129,7 +129,7 @@ export const postBotStats = async ({ client, executionId }: PostBotStatsParams)
sites.map((site) => {
if (!site.enabled) {
// return if site is disabled
return Promise.resolve();
return;
}
const options = {
+1 -1
View File
@@ -18,7 +18,7 @@ export const startLoadTest = async ({ client, executionId }: StartLoadTestParams
if (!loadTestOptions.enabled) {
logger.debug('Load test is disabled in options, cancelling.');
return Promise.resolve();
return;
}
const channelIds = loadTestOptions.channelIdsToJoin;
+1 -3
View File
@@ -65,7 +65,7 @@ export const cannotSendMessageInChannel = async ({ interaction, executionId }: C
logger.debug(
'Sending ephemeral message in channel about insufficient permissions to send message in channel.'
);
return await interaction.editReply({
await interaction.editReply({
embeds: [
new EmbedBuilder()
.setDescription(
@@ -74,8 +74,6 @@ export const cannotSendMessageInChannel = async ({ interaction, executionId }: C
.setColor(embedOptions.colors.warning)
]
});
} else {
return Promise.resolve();
}
} catch (error) {
if (error instanceof Error) {