Skip to content

Commit

Permalink
feat(MessageEmbed): remove normalizeField validation (#5459)
Browse files Browse the repository at this point in the history
  • Loading branch information
anandre committed May 11, 2021
1 parent d219ecd commit ff2f737
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
3 changes: 0 additions & 3 deletions src/errors/Messages.js
Expand Up @@ -37,9 +37,6 @@ const Messages = {
COLOR_RANGE: 'Color must be within the range 0 - 16777215 (0xFFFFFF).',
COLOR_CONVERT: 'Unable to convert color to a number.',

EMBED_FIELD_NAME: 'MessageEmbed field names may not be empty.',
EMBED_FIELD_VALUE: 'MessageEmbed field values may not be empty.',

FILE_NOT_FOUND: file => `File could not be found: ${file}`,

USER_NO_DMCHANNEL: 'No DM Channel exists!',
Expand Down
3 changes: 0 additions & 3 deletions src/structures/MessageEmbed.js
@@ -1,6 +1,5 @@
'use strict';

const { RangeError } = require('../errors');
const Util = require('../util/Util');

/**
Expand Down Expand Up @@ -445,9 +444,7 @@ class MessageEmbed {
*/
static normalizeField(name, value, inline = false) {
name = Util.resolveString(name);
if (!name) throw new RangeError('EMBED_FIELD_NAME');
value = Util.resolveString(value);
if (!value) throw new RangeError('EMBED_FIELD_VALUE');
return { name, value, inline };
}

Expand Down

0 comments on commit ff2f737

Please sign in to comment.