mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
refactor(bot): separate MatchClear from ConfirmClear
This commit is contained in:
parent
f06fdb38ef
commit
f9abcc68c4
9 changed files with 28 additions and 36 deletions
|
|
@ -173,7 +173,7 @@ public class Config
|
|||
Duration? newTimeout;
|
||||
Duration overflow = Duration.Zero;
|
||||
if (ctx.Match("off", "stop", "cancel", "no", "disable", "remove")) newTimeout = Duration.Zero;
|
||||
else if (await ctx.MatchClear()) newTimeout = null;
|
||||
else if (ctx.MatchClear()) newTimeout = null;
|
||||
else
|
||||
{
|
||||
var timeoutStr = ctx.RemainderOrNull();
|
||||
|
|
@ -204,7 +204,7 @@ public class Config
|
|||
{
|
||||
if (ctx.System == null) throw Errors.NoSystemError;
|
||||
|
||||
if (await ctx.MatchClear())
|
||||
if (ctx.MatchClear())
|
||||
{
|
||||
await ctx.Repository.UpdateSystemConfig(ctx.System.Id, new() { UiTz = "UTC" });
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue