mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-14 10:44:55 -05:00
fix the major discord command issue
This commit is contained in:
parent
8cb60ec77e
commit
b4cafe0bec
1 changed files with 2 additions and 2 deletions
|
@ -3,7 +3,7 @@ const path = require('path')
|
||||||
const { EmbedBuilder } = require('discord.js')
|
const { EmbedBuilder } = require('discord.js')
|
||||||
function inject (bot, dcclient, config) {
|
function inject (bot, dcclient, config) {
|
||||||
const loadFiles = require('../util/load_files')
|
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 = {}
|
||||||
bot.command_handler.commands = {}
|
bot.command_handler.commands = {}
|
||||||
bot.command_handler.reload = async function () {
|
bot.command_handler.reload = async function () {
|
||||||
|
@ -111,7 +111,7 @@ function inject (bot, dcclient, config) {
|
||||||
if (!message.content.startsWith(config.discord.prefix)) return
|
if (!message.content.startsWith(config.discord.prefix)) return
|
||||||
bot.command_handler.main(config.discord.prefix, message.member.displayName, message, 'no sender for discord', channeldc)
|
bot.command_handler.main(config.discord.prefix, message.member.displayName, message, 'no sender for discord', channeldc)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return
|
bot.console.error(e.stack)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
bot.on('end', () => {
|
bot.on('end', () => {
|
||||||
|
|
Loading…
Reference in a new issue