mirror of
https://github.com/danbulant/discord.js
synced 2026-06-05 07:42:09 +00:00
Improve codeblock lang
This commit is contained in:
parent
75d45bd587
commit
650acbf662
1 changed files with 3 additions and 3 deletions
|
|
@ -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) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue