mirror of
https://github.com/danbulant/discord.js
synced 2026-05-24 12:35:53 +00:00
Fix split prefix with undefined/null lang
This commit is contained in:
parent
862ec6a5be
commit
136cf66eb0
1 changed files with 1 additions and 1 deletions
|
|
@ -111,7 +111,7 @@ class TextBasedChannel {
|
|||
sendCode(lang, content, options = {}) {
|
||||
if (options.split) {
|
||||
if (typeof options.split !== 'object') options.split = {};
|
||||
if (!options.split.prepend) options.split.prepend = `\`\`\`${lang}\n`;
|
||||
if (!options.split.prepend) options.split.prepend = `\`\`\`${lang ? lang : ''}\n`;
|
||||
if (!options.split.append) options.split.append = '\n```';
|
||||
}
|
||||
content = this.client.resolver.resolveString(content);
|
||||
|
|
|
|||
Loading…
Reference in a new issue