private async Task Client_ReactionAdded(Cacheable <IUserMessage, ulong> arg1, ISocketMessageChannel arg2, SocketReaction reaction) { ////////////////// // Check if bot // ////////////////// if (reaction.User.IsSpecified && reaction.User.Value.IsBot) { return; } var reactionChannel = reaction.Channel as SocketGuildChannel; var reactionUser = reactionChannel.Guild.GetUser(reaction.UserId); if (reactionUser.IsBot) { return; } if ( Vars.menuBuilder.IsActive && Vars.menuBuilder.ChannelID == reaction.Channel.Id && Vars.menuBuilder.UserID == reaction.UserId && Vars.menuBuilder.CommandStep == 3 ) { Console.WriteLine("Launching GroupMenuEmojiAdder"); MenuCreateMethods menuToCreate = new MenuCreateMethods(); await menuToCreate.GroupMenuEmojiAdder(reaction); } else if ( !Vars.menuBuilder.IsActive && Vars.groupMenus.Any ( x => x.KinkMsgID == reaction.MessageId || x.LimitMsgID == reaction.MessageId ) ) { if (!reactionUser.Roles.Any(x => x.Name == "Sinners")) { await reactionUser.SendMessageAsync("You may not use this menu until your intro is approved!"); return; } MenuAddMethods MenuAdding = new MenuAddMethods(); await MenuAdding.KinkAdder(reaction); } //throw new NotImplementedException(); }
private async Task Client_ReactionRemoved(Cacheable <IUserMessage, ulong> arg1, ISocketMessageChannel arg2, SocketReaction reaction) { if (reaction.User.IsSpecified && reaction.User.Value.IsBot) { return; } var reactionChannel = reaction.Channel as SocketGuildChannel; var reactionUser = reactionChannel.Guild.GetUser(reaction.UserId); if (reactionUser.IsBot) { return; } if ( !Vars.menuBuilder.IsActive && Vars.groupMenus.Any ( x => x.KinkMsgID == reaction.MessageId || x.LimitMsgID == reaction.MessageId ) ) { if (!reactionUser.Roles.Any(x => x.Name == "Sinners")) { await reactionUser.SendMessageAsync("You may not use this menu until your intro is approved!"); return; } MenuAddMethods MenuAdding = new MenuAddMethods(); await MenuAdding.KinkRemover(reaction); } //throw new NotImplementedException(); }