(Solved)Unable to get responses from custom commands

I’m working on making custom commands, but have run into the issue of commands not outputting anything at all. The module loads in the console, but when I input the command into the chat, nothing is called. Other commands work just fine, so I’m not sure what I’m missing. Any insight would be appreciated!

(function() {
$.bind('command', function(event) {
        var command = event.getCommand(); // Grabs the command being used
								
    if (command.equalsIgnoreCase('helloworld')) {
        // the following if/else is only required if you have arguments
        $.say("This is a response from my custom script!");
    }
});

$.bind('initReady', function() {
    $.registerChatCommand('./custom/helloWorld.js', 'helloworld', 1);
});
})();

Java Version: 1.8.0_241-b07
OS Version: Windows 10 10.0 (x86)
Panel Version: 1.0.0
PhantomBot Version: 3.0.0 (Revision: fcc08b51)
Stock PhantomBot: Yes

Did you test the command with an user with a right permission? What if you print out the command variable into console?

(To make this a bit clearer this is for Twitch, not Discord.)

I’m using my broadcaster account, but I’ve tried all permissions 1-7.

I have not, but I’m not sure I understand what you mean by print out the variable. I tried adding the $.consoleLn to see if that would output anything. It didn’t.

I also did a new install of the bot just to be sure.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.