mirror of
https://github.com/danbulant/discord.js
synced 2026-05-26 13:32:04 +00:00
Update updateMessage with the new code logic
This commit is contained in:
parent
650acbf662
commit
86ffc86324
1 changed files with 2 additions and 2 deletions
|
|
@ -87,9 +87,9 @@ class RESTMethods {
|
|||
|
||||
updateMessage(message, content, { embed, code } = {}) {
|
||||
content = this.client.resolver.resolveString(content);
|
||||
if (code) {
|
||||
if (typeof code !== 'undefined' && (typeof code !== 'boolean' || code === 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\`\`\``;
|
||||
}
|
||||
return this.rest.makeRequest('patch', Constants.Endpoints.channelMessage(message.channel.id, message.id), true, {
|
||||
content, embed,
|
||||
|
|
|
|||
Loading…
Reference in a new issue