mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 10:33:30 +01:00
Improve codeblock lang
This commit is contained in:
@@ -47,9 +47,9 @@ class RESTMethods {
|
|||||||
if (typeof content !== 'undefined') content = this.client.resolver.resolveString(content);
|
if (typeof content !== 'undefined') content = this.client.resolver.resolveString(content);
|
||||||
|
|
||||||
if (content) {
|
if (content) {
|
||||||
if (typeof code === 'string') {
|
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 !== 'undefined' && code !== null ? code : ''}\n${content}\n\`\`\``;
|
content = `\`\`\`${typeof code !== 'boolean' ? code || '' : ''}\n${content}\n\`\`\``;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (disableEveryone || (typeof disableEveryone === 'undefined' && this.client.options.disableEveryone)) {
|
if (disableEveryone || (typeof disableEveryone === 'undefined' && this.client.options.disableEveryone)) {
|
||||||
@@ -59,7 +59,7 @@ class RESTMethods {
|
|||||||
if (split) content = splitMessage(content, typeof split === 'object' ? split : {});
|
if (split) content = splitMessage(content, typeof split === 'object' ? split : {});
|
||||||
}
|
}
|
||||||
|
|
||||||
const send = (chan) => {
|
const send = chan => {
|
||||||
if (content instanceof Array) {
|
if (content instanceof Array) {
|
||||||
const messages = [];
|
const messages = [];
|
||||||
(function sendChunk(list, index) {
|
(function sendChunk(list, index) {
|
||||||
|
|||||||
Reference in New Issue
Block a user