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.
This commit is contained in:
parent
8724e9efd7
commit
bd8dd13efd
1 changed files with 6 additions and 17 deletions
|
|
@ -117,15 +117,10 @@ namespace BetterSecondBot.HttpService
|
||||||
{
|
{
|
||||||
return Failure("Invaild ban state");
|
return Failure("Invaild ban state");
|
||||||
}
|
}
|
||||||
if (bot.NeedReloadGroupData(groupuuid) == true)
|
|
||||||
{
|
|
||||||
bot.GetClient.Groups.RequestGroupMembers(groupuuid);
|
|
||||||
}
|
|
||||||
ProcessAvatar(avatar);
|
ProcessAvatar(avatar);
|
||||||
KeyValuePair<bool, string> reply = waitForReady(true, true, groupuuid);
|
if(avataruuid == UUID.Zero)
|
||||||
if (reply.Key == false)
|
|
||||||
{
|
{
|
||||||
return Failure(reply.Value);
|
return Failure("avatar lookup");
|
||||||
}
|
}
|
||||||
GroupBanAction action = GroupBanAction.Unban;
|
GroupBanAction action = GroupBanAction.Unban;
|
||||||
string statename = "Unban";
|
string statename = "Unban";
|
||||||
|
|
@ -164,15 +159,10 @@ namespace BetterSecondBot.HttpService
|
||||||
{
|
{
|
||||||
return Failure("Unknown group");
|
return Failure("Unknown group");
|
||||||
}
|
}
|
||||||
if (bot.NeedReloadGroupData(groupuuid) == true)
|
|
||||||
{
|
|
||||||
bot.GetClient.Groups.RequestGroupMembers(groupuuid);
|
|
||||||
}
|
|
||||||
ProcessAvatar(avatar);
|
ProcessAvatar(avatar);
|
||||||
KeyValuePair<bool, string> reply = waitForReady(true, true, groupuuid);
|
if (avataruuid == UUID.Zero)
|
||||||
if (reply.Key == false)
|
|
||||||
{
|
{
|
||||||
return Failure(reply.Value);
|
return Failure("avatar lookup");
|
||||||
}
|
}
|
||||||
bool status = bot.FastCheckInGroup(groupuuid, avataruuid);
|
bool status = bot.FastCheckInGroup(groupuuid, avataruuid);
|
||||||
if(status == false)
|
if(status == false)
|
||||||
|
|
@ -263,10 +253,9 @@ namespace BetterSecondBot.HttpService
|
||||||
bot.GetClient.Groups.RequestGroupMembers(groupuuid);
|
bot.GetClient.Groups.RequestGroupMembers(groupuuid);
|
||||||
}
|
}
|
||||||
ProcessAvatar(avatar);
|
ProcessAvatar(avatar);
|
||||||
KeyValuePair<bool,string> reply = waitForReady(true, true, groupuuid);
|
if (avataruuid == UUID.Zero)
|
||||||
if(reply.Key == false)
|
|
||||||
{
|
{
|
||||||
return Failure(reply.Value);
|
return Failure("avatar lookup");
|
||||||
}
|
}
|
||||||
bool status = bot.FastCheckInGroup(groupuuid, avataruuid);
|
bool status = bot.FastCheckInGroup(groupuuid, avataruuid);
|
||||||
if (status == true)
|
if (status == true)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue