the RaidRandomizer now updates the DiscordMessages
This commit is contained in:
parent
452c9d0fc1
commit
94f92735d1
1 changed files with 4 additions and 1 deletions
|
@ -7,11 +7,13 @@ namespace Lieb.Data
|
||||||
public class RaidRandomizerService
|
public class RaidRandomizerService
|
||||||
{
|
{
|
||||||
private readonly IDbContextFactory<LiebContext> _contextFactory;
|
private readonly IDbContextFactory<LiebContext> _contextFactory;
|
||||||
|
private readonly DiscordService _discordService;
|
||||||
private static Random _random = new Random();
|
private static Random _random = new Random();
|
||||||
|
|
||||||
public RaidRandomizerService(IDbContextFactory<LiebContext> contextFactory)
|
public RaidRandomizerService(IDbContextFactory<LiebContext> contextFactory, DiscordService discordService)
|
||||||
{
|
{
|
||||||
_contextFactory = contextFactory;
|
_contextFactory = contextFactory;
|
||||||
|
_discordService = discordService;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task RandomizeRaid(int raidId)
|
public async Task RandomizeRaid(int raidId)
|
||||||
|
@ -48,6 +50,7 @@ namespace Lieb.Data
|
||||||
await context.SaveChangesAsync();
|
await context.SaveChangesAsync();
|
||||||
CleanUpRoles(raid, context);
|
CleanUpRoles(raid, context);
|
||||||
await context.SaveChangesAsync();
|
await context.SaveChangesAsync();
|
||||||
|
await _discordService.PostRaidMessage(raidId);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RandomizeClasses(Raid raid)
|
private void RandomizeClasses(Raid raid)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue