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

Show serverlocked setting inside [p]set showsettings #6116

Open
wants to merge 2 commits into
base: V3/develop
Choose a base branch
from

Conversation

Kreusada
Copy link
Member

@Kreusada Kreusada commented May 3, 2023

Description of the changes

Currently, there is no proper way to see whether the bot has been serverlocked or not. This PR adds a line which is displayed inside [p]set showsettings, to show whether the bot is serverlocked or not. It first checks whether the Admin cog is loaded (if not, then serverlock cannot function, so it will show as False), and then it accesses the cogs config to see whether serverlock is enabled.

image

Have the changes in this PR been tested?

Yes

@github-actions github-actions bot added the Category: Core - Bot Commands This is related to core commands (Core and CogManagerUI cog classes). label May 3, 2023
@Jackenmen
Copy link
Member

Why is this not done in the Admin cog?

@Kreusada
Copy link
Member Author

Why is this not done in the Admin cog?

I suppose because there wasn't an existing showsettings command for Admin, and that the serverlock setting affects the [p]invite command which is part of Core. Did you have an idea in how to implement this better?

@Flame442
Copy link
Member

The invite command is only really a helper for generating invite URLs. Disabling it doesn't strictly prevent people from inviting the bot, since the URL can be easily generated manually using only the bot ID. [p]invite does interface with the serverlock setting, but mostly just as a warning to the person using it that it isn't going to actually work without disabling the serverlock.

Admin doesn't otherwise have a huge need for a showsettings command, and the only ways to know the setting currently are to toggle/set it or know that [p]invite will warn you about it, so I don't think it would hurt to add some way to check it. The core settings page isn't the worst place to put it, though it is a little confusing to make it the only (afaik) command in set showsettings that isn't modified in set and that relies on another cog being loaded to be configured.

@Flame442 Flame442 added the Type: Enhancement Something meant to enhance existing Red features. label Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Core - Bot Commands This is related to core commands (Core and CogManagerUI cog classes). Type: Enhancement Something meant to enhance existing Red features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants