- Reworked embed builder

- Use IEmbedBuilderService to create embed builders
- Wrapped embed builder and using IEmbedBuilder
This commit is contained in:
Kwoth
2021-07-09 22:23:19 +02:00
parent 5b4daa9dd3
commit 5e4754fa40
103 changed files with 730 additions and 540 deletions

View File

@@ -18,15 +18,17 @@ namespace NadekoBot.Modules.Utility.Services
{
public class CommandMapService : IInputTransformer, INService
{
private readonly IEmbedBuilderService _eb;
public ConcurrentDictionary<ulong, ConcurrentDictionary<string, string>> AliasMaps { get; } = new ConcurrentDictionary<ulong, ConcurrentDictionary<string, string>>();
private readonly DbService _db;
//commandmap
public CommandMapService(DiscordSocketClient client, DbService db)
public CommandMapService(DiscordSocketClient client, DbService db, IEmbedBuilderService eb)
{
_eb = eb;
using (var uow = db.GetDbContext())
{
var guildIds = client.Guilds.Select(x => x.Id).ToList();
@@ -87,7 +89,7 @@ namespace NadekoBot.Modules.Utility.Services
try
{
var toDelete = await channel.SendConfirmAsync($"{input} => {newInput}").ConfigureAwait(false);
var toDelete = await channel.SendConfirmAsync(_eb, $"{input} => {newInput}").ConfigureAwait(false);
var _ = Task.Run(async () =>
{
await Task.Delay(1500).ConfigureAwait(false);