ok for some reason with ever how long i was a developer i for som odd reason cant pull an array to do a rules array and add each rule in the array as a field heres the code i have that dosnt work
const { Message, MessageEmbed } = require("discord.js"); const Client = require("../src/client"); const fs = require("fs"); const rules = fs.readFileSync("./rules.txt"); const warnModel = require("../models/warn"); module.exports = { name: "rule", /** * * @param {Client} client * @param {Message} message * @param {String[]} args */ run: async (client, message, args) => { if (!message.member.roles.cache.has("814142348258181141")) return message.channel.send(`Error! Your Not A <@&814142348258181141>!`); const embed = new MessageEmbed() .setTitle("Rules:") .setFooter("Updated: 9:10PM EST/EDT 3/14/21") .setColor("#df00fa"); const felids = { name: "**1.**", value: "No advertising (on the server or via DM)", inline: true, name: "**2.**", value: "test", inline: true }; for (const { name, value, inline } in felids) { embed.addField(name, value, inline); } await message.channel.send(embed); }, }; https://stackoverflow.com/questions/66631858/discord-embed-feilds-with-array March 15, 2021 at 11:04AM
没有评论:
发表评论