You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Rework !verify-admin to allow single call for both toggle and description #328
The current implementation of !verify-admin is unwieldy and requires two calls to verify a user and set their description. Lets take the difficulty out of that
verification_status=!(grUser.getValue('verified')==1 ? true : false);// Get verified and toggle
grUser.setValue('verified',verification_status);
message_body+='Updated <@'+user_id+'>\'s verification status. They are now '+(verification_status ? 'verified.' : 'unverified. To add a user-visible note instead of toggling verification, add text after `!verify-admin @User `. Example: `!verify-admin @Astrid Is upside down`');
}else{
grUser.setValue('user_info',invocation);
grUser.update();
message_body+='Updated <@'+user_id+'>\'s user info message.';
}
Possible approaches:
Toggle on each call
This falls over if we just want to change someone's role
Use flag (i.e. !verify-admin -v Message)
Use a flag or other indicator and contain Message in quotation marks
Activity