コード例 #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;
 }