예제 #1
0
        internal VkCoreApiBase(BotCore core)
        {
            Core = core;

            _chatsCache = new ConcurrentDictionary <long, BaseChat>();
            _usersCache = new ConcurrentDictionary <long, IUser>();
        }
예제 #2
0
        public VkCoreApi(BotCore core) : base(core)
        {
            _vkApi = new ConcurrentDictionary <long, VkCoreApiBase>();

            var accesToken = Core.Configuration.GetValue <string>($"Config:AccessToken", null);

            if (accesToken != null)
            {
                GroupId = Groups.GetById(null, null, null).First().Id;
                Authorize(new ApiAuthParams {
                    AccessToken = accesToken
                });
            }
        }
예제 #3
0
 internal VkCoreApiBase(BotCore core, long groupId) : this(core)
 {
     GroupId = groupId;
 }