Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

!botname moderate unavailable due to initReady not firing #2449

Closed
gmt2001 opened this issue Feb 6, 2021 · 0 comments
Closed

!botname moderate unavailable due to initReady not firing #2449

gmt2001 opened this issue Feb 6, 2021 · 0 comments
Assignees
Labels
Projects

Comments

@gmt2001
Copy link
Member

gmt2001 commented Feb 6, 2021

Due to initReady not firing until the mod-check passes, the command !botname moderate, which is supposed to force a mod-check, is unavailable if the bot hasn't detected mod status

$api.on($script, 'ircChannelUserMode', function (event) {
callHook('ircChannelUserMode', event, false);
if (event.getUser().equalsIgnoreCase($.botName) && event.getMode().equalsIgnoreCase('O')) {
if (event.getAdd().toString().equals('true')) {
if (isReady === false) {
// Bot is now ready.
consoleLn($.botName + ' ready!');
// Call the initReady event.
callHook('initReady', null, false);
}
isReady = true;
}

/*
* @commandpath botName moderate - Forces the bot to detect its moderator status.
*/
if (action.equalsIgnoreCase('moderate')) {
$.session.getModerationStatus();
}

ref #2444

@gmt2001 gmt2001 added the bug label Feb 6, 2021
@gmt2001 gmt2001 self-assigned this Feb 6, 2021
@gmt2001 gmt2001 added this to Needs triage in Bug Triage via automation Feb 6, 2021
@gmt2001 gmt2001 moved this from Needs triage to Low priority in Bug Triage Feb 6, 2021
Bug Triage automation moved this from Low priority to Closed Feb 21, 2021
MzLiv pushed a commit to MzLiv/PhantomBot that referenced this issue Jul 9, 2021
MzLiv pushed a commit to MzLiv/PhantomBot that referenced this issue Jul 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Bug Triage
  
Closed
Development

No branches or pull requests

1 participant