mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-04 14:38:49 +00:00
fix: small fixes
This commit is contained in:
1 parent
2a1330c9f4
commit
4b48df5393
8 files changed
+13
-11
No files matched your search
@@ -128,7 +128,7 @@ module.exports = {
|
|||||||
iconURL: interaction.user.avatarURL()
|
iconURL: interaction.user.avatarURL()
|
||||||
})
|
})
|
||||||
.setDescription(
|
.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)
|
.setColor(embedOptions.colors.success)
|
||||||
]
|
]
|
||||||
@@ -147,7 +147,7 @@ module.exports = {
|
|||||||
iconURL: interaction.user.avatarURL()
|
iconURL: interaction.user.avatarURL()
|
||||||
})
|
})
|
||||||
.setDescription(
|
.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)
|
.setColor(embedOptions.colors.success)
|
||||||
]
|
]
|
||||||
@@ -165,7 +165,7 @@ module.exports = {
|
|||||||
iconURL: interaction.user.avatarURL()
|
iconURL: interaction.user.avatarURL()
|
||||||
})
|
})
|
||||||
.setDescription(
|
.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)
|
.setColor(embedOptions.colors.success)
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -27,8 +27,7 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
logger.info('Reloading commands across all shards.');
|
logger.debug('Reloading commands across all shards.');
|
||||||
logger.info(`Execution ID: ${executionId}`);
|
|
||||||
await client.shard
|
await client.shard
|
||||||
.broadcastEval(
|
.broadcastEval(
|
||||||
async (shardClient, { executionId }) => {
|
async (shardClient, { executionId }) => {
|
||||||
@@ -37,7 +36,7 @@ module.exports = {
|
|||||||
{ context: { executionId: executionId } }
|
{ context: { executionId: executionId } }
|
||||||
)
|
)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
logger.info('Successfully reloaded commands across all shards.');
|
logger.debug('Successfully reloaded commands across all shards.');
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.error(error, 'Failed to reload commands across shards.');
|
logger.error(error, 'Failed to reload commands across shards.');
|
||||||
|
|||||||
@@ -27,9 +27,13 @@ module.exports = {
|
|||||||
await client.user.setPresence(presenceStatusOptions);
|
await client.user.setPresence(presenceStatusOptions);
|
||||||
|
|
||||||
if (loadTestOptions.enabled) {
|
if (loadTestOptions.enabled) {
|
||||||
|
// 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.');
|
logger.info('Initiating load test for bot client.');
|
||||||
await startLoadTest({ client, executionId });
|
await startLoadTest({ client, executionId });
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const channel = await client.channels.cache.get(systemOptions.systemMessageChannelId);
|
const channel = await client.channels.cache.get(systemOptions.systemMessageChannelId);
|
||||||
|
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const inputTime = new Date();
|
const inputTime = new Date();
|
||||||
|
|
||||||
await command.execute({ interaction, client, executionId });
|
await command.execute({ interaction, client, executionId });
|
||||||
|
|
||||||
const outputTime = new Date();
|
const outputTime = new Date();
|
||||||
|
|||||||
@@ -51,7 +51,5 @@ module.exports = {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
process.env.NODE_ENV === 'development' ? logger.trace(queue, 'Queue object') : null;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -51,7 +51,5 @@ module.exports = {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
process.env.NODE_ENV === 'development' ? logger.trace(queue, 'Queue object') : null;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -17,6 +17,5 @@ module.exports = {
|
|||||||
});
|
});
|
||||||
|
|
||||||
logger.debug(`playerStart event: Started playing '${track.url}'.`);
|
logger.debug(`playerStart event: Started playing '${track.url}'.`);
|
||||||
process.env.NODE_ENV === 'development' ? logger.trace(queue) : null;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -17,6 +17,7 @@ exports.startLoadTest = async ({ client, executionId }) => {
|
|||||||
|
|
||||||
const channelIds = loadTestOptions.channelIdsToJoin;
|
const channelIds = loadTestOptions.channelIdsToJoin;
|
||||||
const track = loadTestOptions.trackUrl;
|
const track = loadTestOptions.trackUrl;
|
||||||
|
|
||||||
logger.info(`Starting load test in ${channelIds.length} specified channels.`);
|
logger.info(`Starting load test in ${channelIds.length} specified channels.`);
|
||||||
|
|
||||||
channelIds.forEach((each) => {
|
channelIds.forEach((each) => {
|
||||||
@@ -41,4 +42,6 @@ exports.startLoadTest = async ({ client, executionId }) => {
|
|||||||
{ context: { channelId: each, track: track } }
|
{ context: { channelId: each, track: track } }
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
logger.info('Load test started across shards in specified channels.');
|
||||||
};
|
};
|
||||||
Reference in new issue
Block a user