Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(MessageEmbed): remove normalizeField validation #5459

Merged
merged 3 commits into from May 11, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
2 changes: 0 additions & 2 deletions src/structures/MessageEmbed.js
Expand Up @@ -428,9 +428,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