mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-08 14:57:54 +00:00
Fix -yes flag matching on linking other accounts
This commit is contained in:
parent
9282d5e9fb
commit
86ed2b1add
2 changed files with 3 additions and 3 deletions
|
|
@ -17,10 +17,10 @@ using PluralKit.Core;
|
|||
|
||||
namespace PluralKit.Bot {
|
||||
public static class ContextUtils {
|
||||
public static async Task<bool> PromptYesNo(this Context ctx, String msgString, DiscordUser user = null, Duration? timeout = null, IEnumerable<IMention> mentions = null)
|
||||
public static async Task<bool> PromptYesNo(this Context ctx, String msgString, DiscordUser user = null, Duration? timeout = null, IEnumerable<IMention> mentions = null, bool matchFlag = true)
|
||||
{
|
||||
DiscordMessage message;
|
||||
if (ctx.MatchFlag("y", "yes")) return true;
|
||||
if (matchFlag && ctx.MatchFlag("y", "yes")) return true;
|
||||
else message = await ctx.Reply(msgString, mentions: mentions);
|
||||
var cts = new CancellationTokenSource();
|
||||
if (user == null) user = ctx.Author;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue