public async Task InteractMultiple(InteractionType type, List <SocketUser> usersT, SocketCommandContext context, SoraContext soraContext) { //FindUserMentioned List <User> users = new List <User>(); usersT.ForEach(x => users.Add(Utility.GetOrCreateUser(x.Id, soraContext))); User giver = Utility.GetOrCreateUser(context.User.Id, soraContext); //var dbUser = Utility.GetOrCreateUser(user, soraContext); switch (type) { case (InteractionType.Pat): foreach (var user in users) { user.Interactions.Pats++; giver.Interactions.PatsGiven++; } break; case (InteractionType.Hug): foreach (var user in users) { user.Interactions.Hugs++; giver.Interactions.HugsGiven++; } break; case (InteractionType.Kiss): foreach (var user in users) { user.Interactions.Kisses++; giver.Interactions.KissesGiven++; } break; case (InteractionType.Poke): foreach (var user in users) { user.Interactions.Pokes++; giver.Interactions.PokesGiven++; } break; case (InteractionType.Slap): foreach (var user in users) { user.Interactions.Slaps++; giver.Interactions.SlapsGiven++; } break; case (InteractionType.High5): foreach (var user in users) { user.Interactions.High5++; giver.Interactions.High5Given++; } break; case (InteractionType.Punch): foreach (var user in users) { user.Interactions.Punches++; giver.Interactions.PunchesGiven++; } break; default: await context.Channel.SendMessageAsync(":no_entry_sign: Something went horribly wrong :eyes:"); break; } await soraContext.SaveChangesAsync(); soraContext.Dispose(); }