mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 09:03:29 +01:00
Refactored static resolvers to Util (#1517)
* ready event will now throw errors properly * ws login rejection fix * moved static resolves to util
This commit is contained in:
@@ -381,13 +381,13 @@ class Message {
|
||||
options = {};
|
||||
}
|
||||
|
||||
if (typeof content !== 'undefined') content = this.client.resolver.resolveString(content);
|
||||
if (typeof content !== 'undefined') content = Util.resolveString(content);
|
||||
|
||||
const { embed, code, reply } = options;
|
||||
|
||||
// Wrap everything in a code block
|
||||
if (typeof code !== 'undefined' && (typeof code !== 'boolean' || code === true)) {
|
||||
content = Util.escapeMarkdown(this.client.resolver.resolveString(content), true);
|
||||
content = Util.escapeMarkdown(Util.resolveString(content), true);
|
||||
content = `\`\`\`${typeof code !== 'boolean' ? code || '' : ''}\n${content}\n\`\`\``;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user