mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-04 06:28:53 +00:00
debug
This commit is contained in:
1 parent
a05f8747ec
commit
9a2379919c
1 file changed
+3
@@ -161,8 +161,10 @@ module.exports = {
|
|||||||
|
|
||||||
// If message length is too long, split into multiple messages
|
// If message length is too long, split into multiple messages
|
||||||
if (lyricsResult.lyrics.length > 3800) {
|
if (lyricsResult.lyrics.length > 3800) {
|
||||||
|
logger.info(`[Shard ${interaction.guild.shardId}] Lyrics too long, splitting into multiple messages.`);
|
||||||
const messageCount = Math.ceil(lyricsResult.lyrics.length / 3800);
|
const messageCount = Math.ceil(lyricsResult.lyrics.length / 3800);
|
||||||
for (let i = 0; i < messageCount; i++) {
|
for (let i = 0; i < messageCount; i++) {
|
||||||
|
logger.info(`[Shard ${interaction.guild.shardId}] Sending message ${i + 1} of ${messageCount}.`);
|
||||||
const message = lyricsResult.lyrics.slice(i * 3800, (i + 1) * 3800);
|
const message = lyricsResult.lyrics.slice(i * 3800, (i + 1) * 3800);
|
||||||
if (i === 0) {
|
if (i === 0) {
|
||||||
await interaction.editReply({
|
await interaction.editReply({
|
||||||
@@ -179,6 +181,7 @@ module.exports = {
|
|||||||
});
|
});
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
|
logger.info(`[Shard ${interaction.guild.shardId}] ELSE.`);
|
||||||
await interaction.channel.send({
|
await interaction.channel.send({
|
||||||
embeds: [
|
embeds: [
|
||||||
new EmbedBuilder()
|
new EmbedBuilder()
|
||||||
|
|||||||
Reference in new issue
Block a user