`;
let fieldsEditor = gui.querySelector('.fields ~ .edit'), addField = `
@@ -352,10 +358,10 @@ window.onload = () => {
@@ -423,6 +429,7 @@ window.onload = () => {
document.querySelector('.addField').addEventListener('click', () => {
!json.embed && (json.embed = {});
let arr = json.embed.fields || [];
+ if (arr.length >= 25) return error('Cannot have more than 25 fields', 5000);
arr.push({ name: "Field name", value: "Field value", inline: false });
json.embed.fields = arr;
update(json);
@@ -653,4 +660,4 @@ window.onload = () => {
let colrs = document.querySelector('.colrs');
document.querySelector('.pickerToggle').addEventListener('click', () => colrs.classList.toggle('display'));
update(json);
-};
+};
\ No newline at end of file