diff options
author | Marko Zajc <marko@zajc.eu.org> | 2023-02-18 14:40:20 +0100 |
---|---|---|
committer | Marko Zajc <marko@zajc.eu.org> | 2023-02-18 14:40:20 +0100 |
commit | 4c9b807b7d6d16e658c09dc36132176b4a5a8f2f (patch) | |
tree | f3055ac9625e07742234a2757df2b8313220c5f2 | |
parent | fa2413da74ae43f630dbe33d75deae5be2d3bec5 (diff) |
Resolve ambiguity with keepPrompt on confirm(f) overloads
-rw-r--r-- | src/main/java/libot/commands/PollCommand.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/libot/commands/PollCommand.java b/src/main/java/libot/commands/PollCommand.java index fdb96ec..0bb2396 100644 --- a/src/main/java/libot/commands/PollCommand.java +++ b/src/main/java/libot/commands/PollCommand.java | |||
@@ -512,7 +512,7 @@ public class PollCommand extends Command { | |||
512 | .addField("Will mention everyone on start?", mentionEveryone ? "Yes" : "No", true) | 512 | .addField("Will mention everyone on start?", mentionEveryone ? "Yes" : "No", true) |
513 | .addField("Will the results be disclosed publicly?", discloseResultsPublicly ? "Yes" : "No", true); | 513 | .addField("Will the results be disclosed publicly?", discloseResultsPublicly ? "Yes" : "No", true); |
514 | 514 | ||
515 | if (c.confirm(b, true)) { | 515 | if (c.confirm(true, b)) { |
516 | if (time < currentTimeMillis()) | 516 | if (time < currentTimeMillis()) |
517 | throw c.error(FORMAT_POLL_EXPIRED, FAILURE); | 517 | throw c.error(FORMAT_POLL_EXPIRED, FAILURE); |
518 | 518 | ||
@@ -525,11 +525,11 @@ public class PollCommand extends Command { | |||
525 | private static boolean shouldMentionEveryone(@Nonnull CommandContext c, @Nonnull TextChannel target) { | 525 | private static boolean shouldMentionEveryone(@Nonnull CommandContext c, @Nonnull TextChannel target) { |
526 | boolean botherAsking = c.getMember().hasPermission(target, MESSAGE_MENTION_EVERYONE) | 526 | boolean botherAsking = c.getMember().hasPermission(target, MESSAGE_MENTION_EVERYONE) |
527 | && c.getSelfMember().hasPermission(target, MESSAGE_MENTION_EVERYONE); | 527 | && c.getSelfMember().hasPermission(target, MESSAGE_MENTION_EVERYONE); |
528 | return botherAsking && c.confirm(FORMAT_SET_MENTION_EVERYONE, LITHIUM, true); | 528 | return botherAsking && c.confirm(true, FORMAT_SET_MENTION_EVERYONE, LITHIUM); |
529 | } | 529 | } |
530 | 530 | ||
531 | private static boolean shouldDiscloseResultsPublicly(@Nonnull CommandContext c, @Nonnull TextChannel target) { | 531 | private static boolean shouldDiscloseResultsPublicly(@Nonnull CommandContext c, @Nonnull TextChannel target) { |
532 | return c.confirmf(FORMAT_SET_PUBLIC, LITHIUM, true, target.getAsMention()); | 532 | return c.confirmf(true, FORMAT_SET_PUBLIC, LITHIUM, target.getAsMention()); |
533 | } | 533 | } |
534 | 534 | ||
535 | @SuppressWarnings("null") | 535 | @SuppressWarnings("null") |
@@ -537,7 +537,7 @@ public class PollCommand extends Command { | |||
537 | var message = FORMAT_SET_MULTIPLE_CHOICES; | 537 | var message = FORMAT_SET_MULTIPLE_CHOICES; |
538 | if (!c.getSelfMember().hasPermission(target, MESSAGE_MANAGE)) | 538 | if (!c.getSelfMember().hasPermission(target, MESSAGE_MANAGE)) |
539 | message += format(FORMAT_MULTIPLE_CHOICES_PERMISSION_NOTE, target.getAsMention()); | 539 | message += format(FORMAT_MULTIPLE_CHOICES_PERMISSION_NOTE, target.getAsMention()); |
540 | return c.confirm(message, LITHIUM, true); | 540 | return c.confirm(true, message, LITHIUM); |
541 | } | 541 | } |
542 | 542 | ||
543 | private static long getTime(@Nonnull CommandContext c) { | 543 | private static long getTime(@Nonnull CommandContext c) { |