async dispatches sending of event overview to discord channel
This commit is contained in:
parent
1dbb749732
commit
ca7258ef28
|
@ -45,11 +45,18 @@ namespace BiblioTech.Rewards
|
|||
private async Task ProcessChainEvents(string[] eventsOverview)
|
||||
{
|
||||
if (eventsChannel == null || eventsOverview == null || !eventsOverview.Any()) return;
|
||||
await Task.Run(async () =>
|
||||
{
|
||||
foreach (var e in eventsOverview)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(e))
|
||||
{
|
||||
await eventsChannel.SendMessageAsync(e);
|
||||
await Task.Delay(3000);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private async Task<Dictionary<ulong, IGuildUser>> LoadAllUsers(SocketGuild guild)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue