mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
feat(MessageEmbed): remove normalizeField validation (#5459)
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const { RangeError } = require('../errors');
|
||||
const Util = require('../util/Util');
|
||||
|
||||
/**
|
||||
@@ -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 };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user