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

            _chatsCache = new ConcurrentDictionary <long, BaseChat>();
            _usersCache = new ConcurrentDictionary <long, IUser>();
        }
Exemple #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
                });
            }
        }
Exemple #3
0
 internal VkCoreApiBase(BotCore core, long groupId) : this(core)
 {
     GroupId = groupId;
 }