mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
move Context#PromptYesNo to buttons
This commit is contained in:
parent
2b15815825
commit
ab6ab127dd
9 changed files with 31 additions and 66 deletions
|
|
@ -294,7 +294,7 @@ namespace PluralKit.Bot
|
|||
|
||||
var currentTime = SystemClock.Instance.GetCurrentInstant().InZone(zone);
|
||||
var msg = $"This will change the system time zone to **{zone.Id}**. The current time is **{currentTime.FormatZoned()}**. Is this correct?";
|
||||
if (!await ctx.PromptYesNo(msg)) throw Errors.TimezoneChangeCancelled;
|
||||
if (!await ctx.PromptYesNo(msg, "Change Timezone")) throw Errors.TimezoneChangeCancelled;
|
||||
|
||||
var patch = new SystemPatch {UiTz = zone.Id};
|
||||
await _db.Execute(conn => _repo.UpdateSystem(conn, ctx.System.Id, patch));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue