Beispiel #1
0
 internal static void Populate(ChannelCategory obj, ChannelJson json, [CanBeNull] object state)
 {
     obj.Name        = json.name;
     obj.Type        = json.type;
     obj.Position    = (int)json.position;
     obj.Permissions = PermissionUtils.GetMask(json.permission_overwrites);
     obj.ServerId    = state != null ? (ulong)state : (ulong)json.guild_id;
     obj.Server      = new CachedPromise <Server>(Servers.Server._cache, obj.ServerId, Servers.Server.GetAsync);
 }