const Lang = require('../util/i18n.js');
const {got, db, slashCommands, sendMsg, createNotice, hasPerm} = require('./util.js');
const fieldset = {
role: ''
+ ''
+ ''
+ '
',
permission: '@UNKNOWN:'
+ ''
+ ''
+ ''
+ '
'
+ ''
+ ''
+ '
'
+ ''
+ ''
+ '
',
save: ''
};
/**
* Create a settings form
* @param {import('cheerio')} $ - The response body
* @param {slashCommands[0]} slashCommand - The slash command
* @param {import('./i18n.js')} 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 ) {
$('