Fix sending codeblocks without a lang

This commit is contained in:
Amish Shah
2016-12-29 14:18:39 +00:00
parent 6d7293e3c5
commit 75d45bd587

View File

@@ -47,7 +47,7 @@ class RESTMethods {
if (typeof content !== 'undefined') content = this.client.resolver.resolveString(content);
if (content) {
if (code) {
if (typeof code === 'string') {
content = escapeMarkdown(this.client.resolver.resolveString(content), true);
content = `\`\`\`${typeof code !== 'undefined' && code !== null ? code : ''}\n${content}\n\`\`\``;
}