mirror of
https://github.com/TeamOctolings/Octobot.git
synced 2025-04-19 16:33:36 +03:00
Fix some issues with /settings
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
This commit is contained in:
parent
514815fb41
commit
0f7ecde996
2 changed files with 2 additions and 2 deletions
|
@ -141,7 +141,7 @@ public class SettingsCommandGroup : CommandGroup {
|
|||
|
||||
builder.Append(Markdown.InlineCode(option.Name))
|
||||
.Append($" {Messages.SettingIsNow} ")
|
||||
.Append(Markdown.InlineCode(option.Display(cfg)));
|
||||
.Append(option.Display(cfg));
|
||||
|
||||
var embed = new EmbedBuilder().WithSmallTitle(Messages.SettingSuccessfullyChanged, currentUser)
|
||||
.WithDescription(builder.ToString())
|
||||
|
|
|
@ -12,7 +12,7 @@ public class TimeSpanOption : Option<TimeSpan> {
|
|||
public override Result Set(JsonNode settings, string from) {
|
||||
var task = Parser.TryParseAsync(from).AsTask().GetAwaiter().GetResult();
|
||||
|
||||
if (task.IsDefined(out var span))
|
||||
if (!task.IsDefined(out var span))
|
||||
return Result.FromError(new ArgumentInvalidError(nameof(from), Messages.InvalidSettingValue));
|
||||
|
||||
settings[Name] = span.ToString();
|
||||
|
|
Loading…
Add table
Reference in a new issue