示例#1
0
        protected override void DoSendMessage(string channel, string message)
        {
            ChannelSendMessage msg = new ChannelSendMessage(channel, message);

            msg.Allowed = allowed;
            Send(msg);
        }
示例#2
0
        public override bool CombineWith(DiscordApiMessage prior)
        {
            ChannelSendMessage msg = prior as ChannelSendMessage;

            if (msg == null || msg.Path != Path)
            {
                return(false);
            }

            if (content.Length + msg.content.Length > 1024)
            {
                return(false);
            }

            // TODO: is stringbuilder even beneficial here
            msg.content.Append('\n');
            msg.content.Append(content.ToString());
            content.Clear();
            return(true);
        }