!host function

#1

I’m having trouble with the !host / !unhost.

At first, my bot did not have ./handlers/hostHandler.js enabled, so I tried with my own custom-commands:
!host -> /host (echo)
!unhost -> /unhost

Worked fine.

Deleted my commands again, and enabled ./handlers/hostHandler.js .Then the commands was appearing in default commands. Tried using ‘!host channel’, and it worked. But no effect using the !unhost. All rights was set as they should be. So … Going back to my first solution and do-it-myself.
I disabled the ./handlers/hostHandler.js, but the !host command was still present in the default commands, and trying to reboot the bot didn’t make any difference. How to get rid of the !host function again?

Second … Why is !unhost not working using default commands?

/Michael.
PhantomBot-3.0.0-NB-20190507

#2

Hey 2cBot,

When disabling a module, the commands associated with said module will stay in the default commands list, this allows us to keep the permissions, cooldowns, costs, etc the same if the user decides to enable the module again in the future or if the user wants to make edits while the module is disabled (like changing costs if it’s too high mid stream without users losing more points than needed).

Regarding the !unhost command, since that is a default command and you create a custom as well, only the custom one will be loaded. When deleting the command, even if you enable the module the command will remain deleted. The only way to bring it back would be to make sure that the custom one is deleted and that the module is enabled then restarting the bot.

Hope this helps!

#3

I deleted the custom commands before the default was enabled as described in my post.

I get the point about the commands staying in the list after disable module. That makes sense, of course, then I can’t create my own again after that the simple way.

Status is, I have no custom commands called !host or !unhost. hostHandler.js is enabled. Permissions are good. !host is working fine, !unhost is not.

/Michael

#4

Hey 2cBot,

I think I see the issue in the code, could you try running !unhost name_of_channel_being_hosted see if that works.

A fix will be applied for our next release.

Thanks!

1 Like
#5

That did the trick! :slight_smile:

Well, of course, I didn’t try that since it didn’t make any sense doing that :smiley: :smiley:

All clear and thanks for feedback and support!

/Michael.

1 Like