From 94f92735d17cbf9f195499febac442bbca029c20 Mon Sep 17 00:00:00 2001 From: Sarah Faey Date: Tue, 6 Dec 2022 14:19:52 +0100 Subject: [PATCH] the RaidRandomizer now updates the DiscordMessages --- Lieb/Data/RaidRandomizerService.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Lieb/Data/RaidRandomizerService.cs b/Lieb/Data/RaidRandomizerService.cs index a52ed29..fcddd16 100644 --- a/Lieb/Data/RaidRandomizerService.cs +++ b/Lieb/Data/RaidRandomizerService.cs @@ -7,11 +7,13 @@ namespace Lieb.Data public class RaidRandomizerService { private readonly IDbContextFactory _contextFactory; + private readonly DiscordService _discordService; private static Random _random = new Random(); - public RaidRandomizerService(IDbContextFactory contextFactory) + public RaidRandomizerService(IDbContextFactory contextFactory, DiscordService discordService) { _contextFactory = contextFactory; + _discordService = discordService; } public async Task RandomizeRaid(int raidId) @@ -48,6 +50,7 @@ namespace Lieb.Data await context.SaveChangesAsync(); CleanUpRoles(raid, context); await context.SaveChangesAsync(); + await _discordService.PostRaidMessage(raidId); } private void RandomizeClasses(Raid raid)