Пример #1
0
        public DiscordMessage()
        {
            Reactions = new List <MessageReaction>();

            OnClientUpdated += (sender, e) =>
            {
                Reactions.SetClientsInList(Client);
                Mentions.SetClientsInList(Client);

                _authorUser.SetClient(Client);

                if (_authorMember != null)
                {
                    _authorMember.SetClient(Client);

                    if (Guild != null)
                    {
                        _authorMember.GuildId = Guild.Id;
                    }
                }

                if (_authorUser == null) // when the client itself is the author, "user" doesn't get sent
                {
                    _authorUser = Client.User;
                }
            };
        }
Пример #2
0
#pragma warning disable CS0649
        public Message()
        {
            Reactions = new List <MessageReaction>();

            OnClientUpdated += (sender, e) =>
            {
                Reactions.SetClientsInList(Client);
                Mentions.SetClientsInList(Client);
            };
        }