Build the Server.EveryoneRole object early just in case
This commit is contained in:
@@ -102,7 +102,8 @@ namespace Discord
|
|||||||
_members = new ConcurrentDictionary<long, ServerMember>();
|
_members = new ConcurrentDictionary<long, ServerMember>();
|
||||||
|
|
||||||
//Local Cache
|
//Local Cache
|
||||||
_bans = new ConcurrentDictionary<long, bool>();
|
_bans = new ConcurrentDictionary<long, bool>();
|
||||||
|
EveryoneRole = _client.Roles.GetOrAdd(id, id);
|
||||||
}
|
}
|
||||||
internal override bool LoadReferences()
|
internal override bool LoadReferences()
|
||||||
{
|
{
|
||||||
@@ -254,11 +255,7 @@ namespace Discord
|
|||||||
}
|
}
|
||||||
internal void RemoveRole(Role role)
|
internal void RemoveRole(Role role)
|
||||||
{
|
{
|
||||||
if (_roles.TryRemove(role.Id, out role))
|
_roles.TryRemove(role.Id, out role);
|
||||||
{
|
|
||||||
if (role.Id == Id)
|
|
||||||
EveryoneRole = null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
internal ServerPermissions GetPermissions(User user)
|
internal ServerPermissions GetPermissions(User user)
|
||||||
|
|||||||
Reference in New Issue
Block a user