mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-03 22:15:37 +00:00
feat!: Added new config system with config npm package
This commit is contained in:
1 parent
5434df7ecf
commit
2da7cb360a
38 files changed
+146
-63
No files matched your search
@@ -1,4 +1,6 @@
|
||||
const { embedOptions, botOptions } = require('../../config');
|
||||
const config = require('config');
|
||||
const embedOptions = config.get('embedOptions');
|
||||
const botOptions = config.get('botOptions');
|
||||
const { SlashCommandBuilder, EmbedBuilder } = require('discord.js');
|
||||
|
||||
module.exports = {
|
||||
@@ -25,14 +27,21 @@ module.exports = {
|
||||
|
||||
const commandListString = commandList.join('\n');
|
||||
|
||||
const supportServerString = botOptions.serverInviteUrl
|
||||
? `${embedOptions.icons.support} **Support server**\nJoin the support server for help or to suggest improvements: \n**${botOptions.serverInviteUrl}**\n\n`
|
||||
: '';
|
||||
const addBotString = botOptions.botInviteUrl
|
||||
? `${embedOptions.icons.bot} **Enjoying ${botOptions.name}?**\nAdd me to another server: \n**[Click me!](${botOptions.botInviteUrl})**`
|
||||
: '';
|
||||
|
||||
return await interaction.editReply({
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`${embedOptions.icons.rule} **List of commands**\n` +
|
||||
`${commandListString}\n\n` +
|
||||
`${embedOptions.icons.support} **Support server**\nJoin the support server for help or to suggest improvements: \n**${botOptions.serverInviteUrl}**\n\n` +
|
||||
`${embedOptions.icons.bot} **Enjoying ${botOptions.name}?**\nAdd me to another server: \n**[Click me!](${botOptions.botInviteUrl})**`
|
||||
supportServerString +
|
||||
addBotString
|
||||
)
|
||||
.setColor(embedOptions.colors.info)
|
||||
]
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
const logger = require('../../services/logger');
|
||||
const { embedOptions } = require('../../config');
|
||||
const config = require('config');
|
||||
const embedOptions = config.get('embedOptions');
|
||||
const { getUptimeFormatted } = require('../../utils/system/getUptimeFormatted');
|
||||
const { SlashCommandBuilder, EmbedBuilder } = require('discord.js');
|
||||
const osu = require('node-os-utils');
|
||||
|
||||
Reference in new issue
Block a user