Ejemplo n.º 1
0
 public void AddMessage(DiscordMessage message)
 {
     DiscordChannel channel = Convert.ChangeType(message.Channel(), typeof(DiscordChannel));
     messageHistoryCache.Add(message);
     if(currentChannel == message.Channel())
         Dispatcher.Invoke(() => AppendMessage(message));
 }
Ejemplo n.º 2
0
 public void RemoveMessage(DiscordMessage m)
 {
     RemoveMessage(m.id, (m.Channel() as DiscordChannel).ID);
 }
Ejemplo n.º 3
0
 public void AppendMessage(DiscordMessage message)
 {
     if(message.author != null && App.ClientConfiguration.Settings.IgnoredUserIDs.Contains(message.author.ID))
     { return; }
     DiscordChannel channel = message.Channel() as DiscordChannel;
     var markdownParser = new Markdown(channel.parent, null);
     var blocks = markdownParser.Transform(message, $"{message.id};{channel.ID}");
     richTextBox.Document.Blocks.AddRange(blocks);
     ToolTip = $"Sent at {message.timestamp}";
     MessageIDs.Add(message.id);
     Messages.Add(message);
 }