mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-04 14:38:49 +00:00
feat!: Updated configuration and moved config location
This commit is contained in:
1 parent
2d0df79dac
commit
dd4b56ae67
40 files changed
+468
-482
No files matched your search
@@ -1,7 +1,6 @@
|
||||
const path = require('node:path');
|
||||
const logger = require(path.resolve('./src/services/logger.js'));
|
||||
const logger = require('../../services/logger');
|
||||
const { embedOptions, systemOptions } = require('../../config');
|
||||
const { EmbedBuilder } = require('discord.js');
|
||||
const { systemMessageChannelId, systemUserId, embedColors, embedIcons } = require(path.resolve('./config.json'));
|
||||
|
||||
module.exports = {
|
||||
name: 'reconnecting',
|
||||
@@ -11,15 +10,15 @@ module.exports = {
|
||||
logger.warn(`${client.user.tag} is reconnecting to Discord APIs.`);
|
||||
|
||||
// send message to system message channel for event
|
||||
if (systemMessageChannelId && systemUserId) {
|
||||
await client.channels.cache.get(systemMessageChannelId).send({
|
||||
if (systemOptions.systemMessageChannelId && systemOptions.systemUserId) {
|
||||
await client.channels.cache.get(systemOptions.systemMessageChannelId).send({
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`${embedIcons.warning} **${client.user.tag}** is **\`reconnecting\`**!` +
|
||||
`\n<@${systemUserId}>`
|
||||
`${embedOptions.icons.warning} **${client.user.tag}** is **\`reconnecting\`**!` +
|
||||
`\n<@${systemOptions.systemUserId}>`
|
||||
)
|
||||
.setColor(embedColors.colorWarning)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user