lint
This commit is contained in:
@@ -485,10 +485,10 @@ namespace PluralKit.Bot
|
||||
else if (ctx.Match("move", "shift", "offset"))
|
||||
await ctx.Execute<Switch>(SwitchMove, m => m.SwitchMove(ctx));
|
||||
else if (ctx.Match("edit", "replace"))
|
||||
if (ctx.Match("out"))
|
||||
await ctx.Execute<Switch>(SwitchEditOut, m => m.SwitchEditOut(ctx));
|
||||
else
|
||||
await ctx.Execute<Switch>(SwitchEdit, m => m.SwitchEdit(ctx));
|
||||
if (ctx.Match("out"))
|
||||
await ctx.Execute<Switch>(SwitchEditOut, m => m.SwitchEditOut(ctx));
|
||||
else
|
||||
await ctx.Execute<Switch>(SwitchEdit, m => m.SwitchEdit(ctx));
|
||||
else if (ctx.Match("delete", "remove", "erase", "cancel", "yeet"))
|
||||
await ctx.Execute<Switch>(SwitchDelete, m => m.SwitchDelete(ctx));
|
||||
else if (ctx.Match("commands", "help"))
|
||||
|
@@ -142,12 +142,12 @@ namespace PluralKit.Bot
|
||||
var lastSwitchDeltaStr = (SystemClock.Instance.GetCurrentInstant() - lastSwitch.Timestamp).FormatDuration();
|
||||
var lastSwitchMemberStr = string.Join(", ", await lastSwitchMembers.Select(m => m.NameFor(ctx)).ToListAsync());
|
||||
var newSwitchMemberStr = string.Join(", ", members.Select(m => m.NameFor(ctx)));
|
||||
|
||||
|
||||
string msg;
|
||||
if (members.Count == 0)
|
||||
msg = $"{Emojis.Warn} This will turn the latest switch ({lastSwitchMemberStr}, {lastSwitchDeltaStr} ago) into a switch-out. Is this okay?";
|
||||
msg = $"{Emojis.Warn} This will turn the latest switch ({lastSwitchMemberStr}, {lastSwitchDeltaStr} ago) into a switch-out. Is this okay?";
|
||||
else
|
||||
msg = $"{Emojis.Warn} This will change the latest switch ({lastSwitchMemberStr}, {lastSwitchDeltaStr} ago) to {newSwitchMemberStr}. Is this okay?";
|
||||
msg = $"{Emojis.Warn} This will change the latest switch ({lastSwitchMemberStr}, {lastSwitchDeltaStr} ago) to {newSwitchMemberStr}. Is this okay?";
|
||||
if (!await ctx.PromptYesNo(msg, "Edit")) throw Errors.SwitchEditCancelled;
|
||||
|
||||
// Actually edit the switch
|
||||
@@ -155,9 +155,9 @@ namespace PluralKit.Bot
|
||||
|
||||
// Tell the user the edit suceeded
|
||||
if (members.Count == 0)
|
||||
await ctx.Reply($"{Emojis.Success} Switch edited. The latest switch is now a switch-out.");
|
||||
await ctx.Reply($"{Emojis.Success} Switch edited. The latest switch is now a switch-out.");
|
||||
else
|
||||
await ctx.Reply($"{Emojis.Success} Switch edited. Current fronter is now {newSwitchMemberStr}.");
|
||||
await ctx.Reply($"{Emojis.Success} Switch edited. Current fronter is now {newSwitchMemberStr}.");
|
||||
}
|
||||
|
||||
public async Task SwitchDelete(Context ctx)
|
||||
|
Reference in New Issue
Block a user