another command handler fix

This commit is contained in:
ChomeNS 2022-12-16 16:58:07 +07:00
parent 33cca1e276
commit 2ac9ff378e

View file

@ -89,7 +89,7 @@ function inject (bot, dcclient, config) {
const username = _username.replace(/§.?/g, '')
const message = _message.replace(/§.?/g, '')
const sender = bot.playersAddedPlayers[username]
bot.command_handler.run(username, username, message, sender, channeldc, bot.hash, bot.ownerHash, username)
bot.command_handler.run(username, message, sender, channeldc, bot.hash, bot.ownerHash, username)
})
function handleDiscordMessages (message) {
try {
@ -98,7 +98,7 @@ function inject (bot, dcclient, config) {
// only receive messages in SPECIFIC channel
if (message.channel.id !== channeldc.id) return
if (!message.content.startsWith(config.discord.prefix)) return
bot.command_handler.main(config.discord.prefix, message.member.displayName, 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) {
return
};