mirror of
https://github.com/TeamOctolings/Octobot.git
synced 2025-04-30 11:09:54 +03:00
this commit is illegal
This commit is contained in:
parent
07e8784d2e
commit
e0161037bb
8 changed files with 63 additions and 3 deletions
|
@ -12,6 +12,18 @@ public sealed class BoolOption : GuildOption<bool>
|
|||
return Get(settings) ? Messages.Yes : Messages.No;
|
||||
}
|
||||
|
||||
public override Result ValueEquals(JsonNode settings, string value, out bool equals)
|
||||
{
|
||||
if (!TryParseBool(value, out var boolean))
|
||||
{
|
||||
equals = false;
|
||||
return new ArgumentInvalidError(nameof(value), Messages.InvalidSettingValue);
|
||||
}
|
||||
|
||||
equals = Value(settings).Equals(boolean.ToString());
|
||||
return Result.Success;
|
||||
}
|
||||
|
||||
public override Result Set(JsonNode settings, string from)
|
||||
{
|
||||
if (!TryParseBool(from, out var value))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue