async Task RunAsync(DiscordClient client, BotChannelList.Item channelItem, CancellationToken cancellationToken = default) { if (!(client.GetChannel(channelItem.Id) is IMessageChannel channel)) { _logger.LogWarning($"Could not find channel {channelItem.Id} to roll in."); return; } await Task.WhenAll(RunRollAsync(client, channel, cancellationToken), RunDailyKakeraAsync(channel, cancellationToken)); }
public Roller(BotChannelList.Item item, CancellationToken cancellationToken) { Cancellation = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken); CurrentItem = item; }