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

Add commands for Roblox Ban API #327

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Flikter
Copy link

@Flikter Flikter commented Jun 28, 2024

This pull request adds DefaultAdmin commands which allow usage of the new Roblox Ban API.

Declarations:

  • I declare that this contribution was created in whole or in part by me.
  • I declare that I have the right to submit this contribution under the terms of this repository's license and declarations.
  • I understand and agree that this contribution and a record of it are public, maintained permanently, and may be redistributed under the terms of this repository's license.

@autonordev
Copy link
Collaborator

Thanks for the pr! I haven't managed to take a proper look at it yet, but I'm worried about the backwards incompatibility: I suspect many devs have commands named ban and unban. This is a larger issue tho and imo an ultimate limitation of the way we do default commands. @wilyt1 thoughts?

@wilyt1
Copy link
Collaborator

wilyt1 commented Jul 10, 2024

If two commands are registered with the same name, the last one registered replaces the original. But since we can't predict if users register default or custom commands last, it could lead to unintended overwriting of custom commands by default ones.

Duration = duration,
DisplayReason = reason,
PrivateReason = reason,
ExcludeAltAccounts = true,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should ExcludeAltAccounts be set to true? I think the default of Roblox's ban system is to include alt accounts, and this seems like both the expectation of devs and its main selling point.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for noticing this. I originally assumed that enabling that option would also ban alternative accounts, not keep them unbanned. I'll correct this now.

{
Type = "duration";
Name = "duration";
Description = "How long the ban should last. A negative value means a permanent ban.";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there should be a more explicit way to specify permanence; negative durations in general seem quite silly. In my game, we do this through the absence of a duration, but that can be confusing to people new to Cmdr.

  • Maybe separate tempban and permban commands?
  • Maybe through a prefixed union type, e.g. ! means permanent. (In practice, this could be something like duration ! string)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with this. I believe we could just keep the existing command and use a prefixed union type. Though, with a type of "duration ! string" and a value of just !, the type validator for primitive strings would flag it, as it's considered a nil value.

Maybe this could be resolved by requiring the user to use !permanent as the value?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants