mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-06 05:47:53 +00:00
bot: add member deletion command
This commit is contained in:
parent
5fc91d895c
commit
72a2fadff8
5 changed files with 22 additions and 1 deletions
|
|
@ -48,6 +48,12 @@ namespace PluralKit.Bot {
|
|||
(ctx.Client as BaseSocketClient).MessageReceived += Inner;
|
||||
return await (tcs.Task.TimeoutAfter(timeout));
|
||||
}
|
||||
|
||||
public static async Task<bool> ConfirmWithReply(this ICommandContext ctx, string expectedReply)
|
||||
{
|
||||
var msg = await ctx.AwaitMessage(ctx.Channel, ctx.User, timeout: TimeSpan.FromMinutes(1));
|
||||
return string.Equals(msg.Content, expectedReply, StringComparison.InvariantCultureIgnoreCase);
|
||||
}
|
||||
|
||||
public static async Task Paginate<T>(this ICommandContext ctx, ICollection<T> items, int itemsPerPage, string title, Action<EmbedBuilder, IEnumerable<T>> renderer) {
|
||||
var pageCount = (items.Count / itemsPerPage) + 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue