Beispiel #1
0
        internal Channel AddChannel(ulong id, bool cachePerms)
        {
            var channel = new Channel(Client, id, this);

            if (cachePerms && Client.Config.UsePermissionsCache)
            {
                foreach (var user in Users)
                {
                    channel.AddUser(user);
                }
            }
            Client.AddChannel(channel);
            return(_channels.GetOrAdd(id, x => channel));
        }
Beispiel #2
0
 internal Channel AddChannel(ulong id, bool cachePerms)
 {
     var channel = new Channel(Client, id, this);
     if (cachePerms && Client.Config.UsePermissionsCache)
     {
         foreach (var user in Users)
             channel.AddUser(user);
     }
     Client.AddChannel(channel);
     return _channels.GetOrAdd(id, x => channel);
 }