Update AwaitReplyEventBot.cs
This commit is contained in:
parent
0b1b6b6eab
commit
240ba3decf
1 changed files with 19 additions and 20 deletions
|
|
@ -109,27 +109,26 @@ namespace BSB.bottypes
|
|||
}
|
||||
}
|
||||
protected void GroupRolesData(object sender,GroupRolesDataReplyEventArgs e)
|
||||
{
|
||||
if(await_events.ContainsKey("grouproles") == true)
|
||||
{
|
||||
// update group role storage
|
||||
List<GroupRole> entrys = new List<GroupRole>();
|
||||
foreach (GroupRole gr in e.Roles.Values)
|
||||
{
|
||||
entrys.Add(gr);
|
||||
}
|
||||
|
||||
KeyValuePair<long, List<GroupRole>> storage = new KeyValuePair<long, List<GroupRole>>(helpers.UnixTimeNow(), entrys);
|
||||
if (mygrouprolesstorage.ContainsKey(e.GroupID) == false)
|
||||
{
|
||||
mygrouprolesstorage.Add(e.GroupID, storage);
|
||||
}
|
||||
else
|
||||
{
|
||||
mygrouprolesstorage[e.GroupID] = storage;
|
||||
}
|
||||
// trigger events
|
||||
if (await_events.ContainsKey("grouproles") == true)
|
||||
{
|
||||
// update group role storage
|
||||
List<GroupRole> entrys = new List<GroupRole>();
|
||||
foreach(GroupRole gr in e.Roles.Values)
|
||||
{
|
||||
entrys.Add(gr);
|
||||
}
|
||||
|
||||
KeyValuePair<long, List<GroupRole>> storage = new KeyValuePair<long, List<GroupRole>>(helpers.UnixTimeNow(), entrys);
|
||||
if (mygrouprolesstorage.ContainsKey(e.GroupID) == false)
|
||||
{
|
||||
mygrouprolesstorage.Add(e.GroupID, storage);
|
||||
}
|
||||
else
|
||||
{
|
||||
mygrouprolesstorage[e.GroupID] = storage;
|
||||
}
|
||||
|
||||
|
||||
List<string> PurgeAwaiters = new List<string>();
|
||||
foreach(KeyValuePair<string, KeyValuePair<CoreCommand, string[]>> await_reply in await_events["grouproles"])
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue