import Lang from '../util/i18n.js'; import { got, db, slashCommands, sendMsg, createNotice, hasPerm } from './util.js'; const fieldset = { role: '' + '' + '' + '
', permission: '@UNKNOWN:' + '
' + '' + '' + '
' + '' + '' + '
' + '' + '' + '
', save: '' }; /** * Create a settings form * @param {import('cheerio').CheerioAPI} $ - The response body * @param {slashCommands[0]} slashCommand - The slash command * @param {import('./i18n.js').default} dashboardLang - The user language * @param {Object[]} permissions - The current permissions * @param {String} permissions.id * @param {Number} permissions.type * @param {Boolean} permissions.permission * @param {String} guildId - The guild id * @param {import('./util.js').Role[]} guildRoles - The guild roles */ function createForm($, slashCommand, dashboardLang, permissions, guildId, guildRoles) { var readonly = ( process.env.READONLY ? true : false ); var fields = []; if ( !readonly ) { $('