mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 20:43:30 +01:00
fix sending code when you aren't splitting the message (#1162)
* fasguhq4wbyghjehuibh kjgewqhuilb * Update RESTMethods.js
This commit is contained in:
@@ -68,9 +68,11 @@ class RESTMethods {
|
|||||||
if (typeof code !== 'undefined' && (typeof code !== 'boolean' || code === true)) {
|
if (typeof code !== 'undefined' && (typeof code !== 'boolean' || code === true)) {
|
||||||
content = escapeMarkdown(this.client.resolver.resolveString(content), true);
|
content = escapeMarkdown(this.client.resolver.resolveString(content), true);
|
||||||
content = `\`\`\`${typeof code !== 'boolean' ? code || '' : ''}\n${content}\n\`\`\``;
|
content = `\`\`\`${typeof code !== 'boolean' ? code || '' : ''}\n${content}\n\`\`\``;
|
||||||
|
if (split) {
|
||||||
split.prepend = `\`\`\`${typeof code !== 'boolean' ? code || '' : ''}\n`;
|
split.prepend = `\`\`\`${typeof code !== 'boolean' ? code || '' : ''}\n`;
|
||||||
split.append = '\n```';
|
split.append = '\n```';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Add zero-width spaces to @everyone/@here
|
// Add zero-width spaces to @everyone/@here
|
||||||
if (disableEveryone || (typeof disableEveryone === 'undefined' && this.client.options.disableEveryone)) {
|
if (disableEveryone || (typeof disableEveryone === 'undefined' && this.client.options.disableEveryone)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user