예제 #1
0
        internal override void Invoke(MessageReceivedEventArgs e)
        {
            string message = PlainText.Unescape(e.Message);

            if (message.Contains("@"))
            {
                var mentions = ((IGroup)e.Source).GetMembers().Where(x => message.Contains("@" + x.DisplayName, StringComparison.OrdinalIgnoreCase)).Select(x => x.Mention().ToSendableString());
                if (mentions.Any())
                {
                    e.Source.Send(string.Join(" ", mentions));
                }
            }
        }