Пример #1
0
        protected override async Task Handle(IssueChangedIsClosedIntegrationEvent command)
        {
            var embed = EmbedHelper.IsClosedChanged(command.Issue);

            await foreach (var(channelId, nexusModsGameId, nexusModsModId, _, _) in _subscriptionQueries.GetAllAsync())
            {
                if (await _discordClient.GetChannelAsync(channelId) is not IMessageChannel channel)
                {
                    continue;
                }
                if (nexusModsGameId != command.Issue.NexusModsGameId || nexusModsModId != command.Issue.NexusModsModId)
                {
                    continue;
                }
                await channel.SendMessageAsync(embed : embed);
            }
        }