From bd8dd13efd98e5f89745fbc2e72c7c9e4703148d Mon Sep 17 00:00:00 2001 From: Madpeterz <57852827+Madpeterz@users.noreply.github.com> Date: Sat, 6 Mar 2021 15:44:33 +0000 Subject: [PATCH] Update Group.cs The following commands: GroupBan, GroupEject, GroupInvite will no longer wait for group data to update and will issue the command asap for best results please also use a avatars uuid. --- Core/Commands/Group.cs | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/Core/Commands/Group.cs b/Core/Commands/Group.cs index d860053..6297677 100644 --- a/Core/Commands/Group.cs +++ b/Core/Commands/Group.cs @@ -117,15 +117,10 @@ namespace BetterSecondBot.HttpService { return Failure("Invaild ban state"); } - if (bot.NeedReloadGroupData(groupuuid) == true) - { - bot.GetClient.Groups.RequestGroupMembers(groupuuid); - } ProcessAvatar(avatar); - KeyValuePair reply = waitForReady(true, true, groupuuid); - if (reply.Key == false) + if(avataruuid == UUID.Zero) { - return Failure(reply.Value); + return Failure("avatar lookup"); } GroupBanAction action = GroupBanAction.Unban; string statename = "Unban"; @@ -164,15 +159,10 @@ namespace BetterSecondBot.HttpService { return Failure("Unknown group"); } - if (bot.NeedReloadGroupData(groupuuid) == true) - { - bot.GetClient.Groups.RequestGroupMembers(groupuuid); - } ProcessAvatar(avatar); - KeyValuePair reply = waitForReady(true, true, groupuuid); - if (reply.Key == false) + if (avataruuid == UUID.Zero) { - return Failure(reply.Value); + return Failure("avatar lookup"); } bool status = bot.FastCheckInGroup(groupuuid, avataruuid); if(status == false) @@ -263,10 +253,9 @@ namespace BetterSecondBot.HttpService bot.GetClient.Groups.RequestGroupMembers(groupuuid); } ProcessAvatar(avatar); - KeyValuePair reply = waitForReady(true, true, groupuuid); - if(reply.Key == false) + if (avataruuid == UUID.Zero) { - return Failure(reply.Value); + return Failure("avatar lookup"); } bool status = bot.FastCheckInGroup(groupuuid, avataruuid); if (status == true)