Greatly unboilerplated and simplified nadeko interaction button construction

This commit is contained in:
Kwoth
2022-08-07 17:00:36 +02:00
parent 13d2fbd560
commit 38e3badb87
18 changed files with 110 additions and 291 deletions

View File

@@ -33,7 +33,7 @@ public static class MessageChannelExtensions
public static async Task<IUserMessage> SendAsync(
this IMessageChannel channel,
string? plainText,
NadekoButtonInteraction? inter,
NadekoInteraction? inter,
Embed? embed = null,
IReadOnlyCollection<Embed>? embeds = null,
bool sanitizeAll = false)
@@ -72,7 +72,7 @@ public static class MessageChannelExtensions
IEmbedBuilder? embed,
string plainText = "",
IReadOnlyCollection<IEmbedBuilder>? embeds = null,
NadekoButtonInteraction? inter = null)
NadekoInteraction? inter = null)
=> ch.SendAsync(plainText,
inter,
embed: embed?.Build(),
@@ -83,7 +83,7 @@ public static class MessageChannelExtensions
IEmbedBuilderService eb,
string text,
MessageType type,
NadekoButtonInteraction? inter = null)
NadekoInteraction? inter = null)
{
var builder = eb.Create().WithDescription(text);

View File

@@ -56,7 +56,7 @@ public static class SocketMessageComponentExtensions
IEmbedBuilder? embed,
string plainText = "",
IReadOnlyCollection<IEmbedBuilder>? embeds = null,
NadekoButtonInteraction? inter = null,
NadekoInteraction? inter = null,
bool ephemeral = false)
=> smc.RespondAsync(plainText,
embed: embed?.Build(),
@@ -69,7 +69,7 @@ public static class SocketMessageComponentExtensions
string text,
MessageType type,
bool ephemeral = false,
NadekoButtonInteraction? inter = null)
NadekoInteraction? inter = null)
{
var builder = eb.Create().WithDescription(text);