diff --git a/src/Discord.Net/Format.cs b/src/Discord.Net/Format.cs index 42cad6877..eda143d2e 100644 --- a/src/Discord.Net/Format.cs +++ b/src/Discord.Net/Format.cs @@ -104,7 +104,7 @@ namespace Discord /// Returns a markdown-formatted string with strikeout formatting, optionally escaping the contents. public static string Code(string text, string language = null, bool escape = true) { - if (text.Contains("\n")) + if (language != null || text.Contains("\n")) return $"```{language ?? ""}\n{(escape ? Escape(text) : text)}\n```"; else return $"`{(escape ? Escape(text) : text)}`";