public PostGuildInviteToChatBoxEventListener(IGuildMemberInviteEventEventSubscribable subscriptionService, INameQueryService nameQueryService, [NotNull] IEntityNameQueryable entityNameQueryable, [NotNull] IChatTextMessageRecievedEventPublisher textChatPublisher) : base(subscriptionService) { NameQueryService = nameQueryService; EntityNameQueryable = entityNameQueryable ?? throw new ArgumentNullException(nameof(entityNameQueryable)); TextChatPublisher = textChatPublisher ?? throw new ArgumentNullException(nameof(textChatPublisher)); }
public PopupGuildInviteWindowEventListener(IGuildMemberInviteEventEventSubscribable subscriptionService, [KeyFilter(UnityUIRegisterationKey.InvitedToGuildWindow)][NotNull] IUIGuildInviteWindow guildInviteWindow, INameQueryService nameQueryService, [NotNull] IEntityNameQueryable entityNameQueryable, [NotNull] IRemoteSocialHubServer socialHub) : base(subscriptionService) { GuildInviteWindow = guildInviteWindow ?? throw new ArgumentNullException(nameof(guildInviteWindow)); NameQueryService = nameQueryService; EntityNameQueryable = entityNameQueryable ?? throw new ArgumentNullException(nameof(entityNameQueryable)); SocialHub = socialHub ?? throw new ArgumentNullException(nameof(socialHub)); //Here we rig up the decline and accept invite buttons guildInviteWindow.AcceptInviteButton.AddOnClickListener(() => SocialHub.SendGuildInviteEventResponseAsync(new PendingGuildInviteHandleRequest(true))); guildInviteWindow.DeclineInviteButton.AddOnClickListener(() => SocialHub.SendGuildInviteEventResponseAsync(new PendingGuildInviteHandleRequest(false))); }