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

@@ -0,0 +1,20 @@
namespace NadekoBot;
public class NadekoInteractionService : INadekoInteractionService, INService
{
private readonly DiscordSocketClient _client;
public NadekoInteractionService(DiscordSocketClient client)
{
_client = client;
}
public NadekoInteraction Create<T>(
ulong userId,
SimpleInteraction<T> inter)
=> new NadekoInteraction(_client,
userId,
inter.Button,
inter.TriggerAsync,
onlyAuthor: true);
}