mirror of
https://github.com/D1GQ/BetterAmongUs.git
synced 2026-10-20 01:46:19 +00:00
23 lines
555 B
C#
23 lines
555 B
C#
namespace BetterAmongUs.Commands;
|
|
|
|
internal class BoolArgument(BaseCommand? command, string argInfo = "{bool}") : BaseArgument(command, argInfo)
|
|
{
|
|
protected override string[] ArgSuggestions => ["true", "false"];
|
|
internal bool? GetBool()
|
|
{
|
|
if (Arg.ToLower() is "true")
|
|
{
|
|
return true;
|
|
}
|
|
else if (Arg.ToLower() is "false" or "")
|
|
{
|
|
return false;
|
|
}
|
|
else
|
|
{
|
|
BaseCommand.CommandErrorText($"Invalid Syntax!");
|
|
}
|
|
|
|
return null;
|
|
}
|
|
} |