示例#1
0
        protected override async Task Handle(CommentRemovedReplyIntegrationEvent command)
        {
            var embed = AttachmentHelper.DeletedCommentReply(command.Comment, command.Reply);

            await foreach (var(channelId, nexusModsGameId, nexusModsModId, _, _) in _subscriptionQueries.GetAllAsync())
            {
                if (await _slackBot.GetConversationById(channelId) is not {
                } channel)
                {
                    continue;
                }
                if (nexusModsGameId != command.Comment.NexusModsGameId || nexusModsModId != command.Comment.NexusModsModId)
                {
                    continue;
                }
                await _slackBot.Send(new BotMessage { Conversation = new ConversationByRef(channel), Attachments = { embed } });
            }
        }