fix: small fixes

This commit is contained in:
Marius Begby committed 2023-08-26 18:50:52 +02:00
1 parent 2a1330c9f4
commit 4b48df5393
8 files changed
+15 -13

No files matched your search

+3 -3
View File
@@ -128,7 +128,7 @@ module.exports = {
iconURL: interaction.user.avatarURL()
})
.setDescription(
`**${embedOptions.icons.success} Loop mode disabled**\nChanging loop mode from \`${currentModeUserString}\` to \`${modeUserString}\`.\n\nThe ${currentModeUserString} will no longer play on repeat!`
`**${embedOptions.icons.success} Loop mode disabled**\nChanging loop mode from **\`${currentModeUserString}\`** to **\`${modeUserString}\`**.\n\nThe ${currentModeUserString} will no longer play on repeat!`
)
.setColor(embedOptions.colors.success)
]
@@ -147,7 +147,7 @@ module.exports = {
iconURL: interaction.user.avatarURL()
})
.setDescription(
`**${embedOptions.icons.autoplaying} Loop mode changed**\nChanging loop mode from \`${currentModeUserString}\` to \`${modeUserString}\`.\n\nWhen the queue is empty, similar tracks will start playing!`
`**${embedOptions.icons.autoplaying} Loop mode changed**\nChanging loop mode from **\`${currentModeUserString}\`** to **\`${modeUserString}\`**.\n\nWhen the queue is empty, similar tracks will start playing!`
)
.setColor(embedOptions.colors.success)
]
@@ -165,7 +165,7 @@ module.exports = {
iconURL: interaction.user.avatarURL()
})
.setDescription(
`**${embedOptions.icons.looping} Loop mode changed**\nChanging loop mode from \`${currentModeUserString}\` to \`${modeUserString}\`.\n\nThe ${modeUserString} will now play on repeat!`
`**${embedOptions.icons.looping} Loop mode changed**\nChanging loop mode from **\`${currentModeUserString}\`** to **\`${modeUserString}\`**.\n\nThe ${modeUserString} will now play on repeat!`
)
.setColor(embedOptions.colors.success)
]
+2 -3
View File
@@ -27,8 +27,7 @@ module.exports = {
}
try {
logger.info('Reloading commands across all shards.');
logger.info(`Execution ID: ${executionId}`);
logger.debug('Reloading commands across all shards.');
await client.shard
.broadcastEval(
async (shardClient, { executionId }) => {
@@ -37,7 +36,7 @@ module.exports = {
{ context: { executionId: executionId } }
)
.then(() => {
logger.info('Successfully reloaded commands across all shards.');
logger.debug('Successfully reloaded commands across all shards.');
});
} catch (error) {
logger.error(error, 'Failed to reload commands across shards.');
+6 -2
View File
@@ -27,8 +27,12 @@ module.exports = {
await client.user.setPresence(presenceStatusOptions);
if (loadTestOptions.enabled) {
logger.info('Initiating load test for bot client.');
await startLoadTest({ client, executionId });
// Only call function from shard with id 0
// The function uses broadcastEval() to call itself on all shards
if (client.shard.ids[0] === 0) {
logger.info('Initiating load test for bot client.');
await startLoadTest({ client, executionId });
}
}
const channel = await client.channels.cache.get(systemOptions.systemMessageChannelId);
@@ -64,6 +64,7 @@ module.exports = {
}
const inputTime = new Date();
await command.execute({ interaction, client, executionId });
const outputTime = new Date();
-2
View File
@@ -51,7 +51,5 @@ module.exports = {
});
}
}
process.env.NODE_ENV === 'development' ? logger.trace(queue, 'Queue object') : null;
}
};
-2
View File
@@ -51,7 +51,5 @@ module.exports = {
});
}
}
process.env.NODE_ENV === 'development' ? logger.trace(queue, 'Queue object') : null;
}
};
-1
View File
@@ -17,6 +17,5 @@ module.exports = {
});
logger.debug(`playerStart event: Started playing '${track.url}'.`);
process.env.NODE_ENV === 'development' ? logger.trace(queue) : null;
}
};
+3
View File
@@ -17,6 +17,7 @@ exports.startLoadTest = async ({ client, executionId }) => {
const channelIds = loadTestOptions.channelIdsToJoin;
const track = loadTestOptions.trackUrl;
logger.info(`Starting load test in ${channelIds.length} specified channels.`);
channelIds.forEach((each) => {
@@ -41,4 +42,6 @@ exports.startLoadTest = async ({ client, executionId }) => {
{ context: { channelId: each, track: track } }
);
});
logger.info('Load test started across shards in specified channels.');
};