Skip to content
This repository has been archived by the owner on Oct 19, 2023. It is now read-only.

[bug report]GetGroupMemberInfo无法获取用户的群昵称 #179

Open
cosidn opened this issue Sep 10, 2022 · 0 comments
Open

[bug report]GetGroupMemberInfo无法获取用户的群昵称 #179

cosidn opened this issue Sep 10, 2022 · 0 comments
Assignees
Labels
pending (;´д`)ゞ Unknown problem and waiting for issue tracking or something wont to be done now

Comments

@cosidn
Copy link

cosidn commented Sep 10, 2022

Environment / 环境
Konata.Core 1.3.1
Windows Server 2022 Datacenter

Expected behavior / 预期行为
能够获取用户的群昵称,而现在的群昵称内容为空

To Reproduce / 复现

public class MessageReceiver : IDisposable
    {
        private readonly Bot _bot;
        public MessageReceiver()
        {
            _bot = BotFather.Create(GetConfig(),
                GetDevice(), GetKeyStore());
            _bot.OnGroupPoke    += BotOnGroupPoke;
        }


        private void BotOnGroupPoke(Bot bot, GroupPokeEvent groupPokeEvent)
        {
            var groupList = bot.GetGroupList().Result;
            BotGroup? konataGroup = groupList.FirstOrDefault(konataGroup =>
                                                                 konataGroup is not null &&
                                                                 konataGroup.Uin == groupPokeEvent.GroupUin);
            if (konataGroup is null) { return; }

            BotMember? konataUserSender =
                bot.GetGroupMemberInfo(groupPokeEvent.GroupUin, groupPokeEvent.OperatorUin).Result;
            if (konataUserSender is null) { return; }

            BotMember? konataUserTarget =
                bot.GetGroupMemberInfo(groupPokeEvent.GroupUin, groupPokeEvent.MemberUin).Result;
            if (konataUserTarget is null) { return; }

        }
        public async Task<bool> Start() { return await _bot.Login(); }

        public void Dispose() { _bot.Dispose(); }
    }
@TheSnowfield TheSnowfield self-assigned this Sep 11, 2022
@TheSnowfield TheSnowfield added the pending (;´д`)ゞ Unknown problem and waiting for issue tracking or something wont to be done now label Sep 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pending (;´д`)ゞ Unknown problem and waiting for issue tracking or something wont to be done now
Projects
None yet
Development

No branches or pull requests

2 participants