/// <summary> /// Create a new Discord message. /// </summary> /// <param name="username">The unsername to use when posting.</param> /// <param name="introText">The intro text that will appear before the first image, if there is one.</param> /// <param name="screenCaptures">The set of available and selected screen captures that may be shared as part of the message.</param> internal Message(string username, string introText, DevLogScreenCaptureCollection screenCaptures) { this.username = username; this.introText = introText; for (int i = 0; i < screenCaptures.Count; i++) { DevLogScreenCapture capture = screenCaptures.captures[i]; if (!capture.IsSelected) { continue; } ImageContent image = new ImageContent("File" + i, capture); files.Add(image); } }
internal Message(string username, DevLogEntry entry) { this.entry = entry; this.username = username; this.introText = entry.shortDescription; for (int i = 0; i < entry.metaData.Count; i++) { if (!entry.metaData[i].StartsWith("#")) { introText += " " + entry.metaData[i]; } } this.bodyText = entry.longDescription; for (int i = 0; i < entry.captures.Count; i++) { DevLogScreenCapture capture = entry.captures[i]; ImageContent image = new ImageContent("File" + i, capture); files.Add(image); } }