ufosc / ALBot-2.0

Alpha version of ALBot 2.0, the spiritual successor to ALBot
GNU General Public License v3.0
4 stars 8 forks source link

remove hardcoding of officer #23

Closed skbt27i closed 2 years ago

awhigham9 commented 2 years ago

Can you change the error message here to something that explains that admin-privileged roles cannot be opened?

            if(!role.permissions.has('ADMINISTRATOR'))
           {
                permitted.add((name as string))
                await interaction.reply(`role permissions saved successfully!`);
           }
           else
           {
            // This error message
            await interaction.reply(`Officer channel access blocked`);
           }

Maybe, "Cannot open role with administrator privileges" or "Cannot open role with elevated privileges"?

awhigham9 commented 2 years ago

Also, I think the code should be reformatted for indentation and semicolons added, but that is a straightforward fix

awhigham9 commented 2 years ago

Also we should replace the use of "officer" in the messages to "administrator" to match the logic

skbt27i commented 2 years ago

Also, I think the code should be reformatted for indentation and semicolons added, but that is a straightforward fix

I just put it through a formatter, is this good?