From b4cafe0bec654a91b006451468e2e35d2074c49e Mon Sep 17 00:00:00 2001 From: ChomeNS Date: Thu, 16 Mar 2023 09:23:18 +0700 Subject: [PATCH] fix the major discord command issue --- plugins/commands.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/commands.js b/plugins/commands.js index 1bbc0ca..270b0d5 100644 --- a/plugins/commands.js +++ b/plugins/commands.js @@ -3,7 +3,7 @@ const path = require('path') const { EmbedBuilder } = require('discord.js') function inject (bot, dcclient, config) { const loadFiles = require('../util/load_files') - const channeldc = dcclient.channels.cache.get(config.discord.servers[bot.server.host]) + const channeldc = dcclient.channels.cache.get(config.discord.servers[`${bot.server.host}:${bot.server.port}`]) bot.command_handler = {} bot.command_handler.commands = {} bot.command_handler.reload = async function () { @@ -111,7 +111,7 @@ function inject (bot, dcclient, config) { if (!message.content.startsWith(config.discord.prefix)) return bot.command_handler.main(config.discord.prefix, message.member.displayName, message, 'no sender for discord', channeldc) } catch (e) { - return + bot.console.error(e.stack) }; } bot.on('end', () => {