mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-13 18:34:54 -05:00
a
This commit is contained in:
parent
f91e2304b5
commit
7057a75ab8
1 changed files with 4 additions and 4 deletions
|
@ -10,7 +10,7 @@ function inject (bot, dcclient, config) {
|
|||
bot.command_handler.commands = await loadFiles(path.join(__dirname, config.commandsDir))
|
||||
}
|
||||
bot.command_handler.reload()
|
||||
bot.command_handler.main = function (prefix, username, message, sender, channeldc, hash, ownerhash, selector, proxy) {
|
||||
bot.command_handler.main = function (prefix, username, message, sender, channeldc, hash, ownerhash, selector) {
|
||||
bot.command_handler.reload()
|
||||
let raw
|
||||
let command
|
||||
|
@ -41,7 +41,7 @@ function inject (bot, dcclient, config) {
|
|||
if (!command.discordExecute) throw new Error('This command is not yet supported on discord!')
|
||||
command.discordExecute(bot, username, sender, prefix, args, channeldc, message, config)
|
||||
} else {
|
||||
command.execute(bot, username, sender, prefix, args, config, hash, ownerhash, selector, proxy)
|
||||
command.execute(bot, username, sender, prefix, args, config, hash, ownerhash, selector)
|
||||
}
|
||||
} catch (e) {
|
||||
if (prefix === config.discord.prefix) {
|
||||
|
@ -55,10 +55,10 @@ function inject (bot, dcclient, config) {
|
|||
}
|
||||
}
|
||||
}
|
||||
bot.command_handler.run = function (username, message, sender, channeldc, hash, ownerhash, selector = '@a', proxy) {
|
||||
bot.command_handler.run = function (username, message, sender, channeldc, hash, ownerhash, selector = '@a') {
|
||||
for (const prefix of config.prefixes) {
|
||||
if (!message.startsWith(prefix)) continue
|
||||
bot.command_handler.main(prefix, username, message, sender, channeldc, hash, ownerhash, selector, proxy)
|
||||
bot.command_handler.main(prefix, username, message, sender, channeldc, hash, ownerhash, selector)
|
||||
}
|
||||
}
|
||||
bot.on('chat', async (_username, _message) => {
|
||||
|
|
Loading…
Reference in a new issue