{"size": 1404, "ext": "js", "max_stars_repo_path": "commands/config/explicit-content.js", "max_stars_repo_name": "lxvongobsthndlE/shard_discord_bot", "max_stars_repo_stars_event_min_datetime": "2021-03-03T16:44:09.000Z", "max_stars_repo_stars_event_max_datetime": "2022-02-28T00:36:43.000Z", "max_issues_repo_path": "commands/config/explicit-content.js", "max_issues_repo_name": "lxvongobsthndlE/shard_discord_bot", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "commands/config/explicit-content.js", "max_forks_repo_name": "lxvongobsthndlE/shard_discord_bot", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 3, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 46.8, "max_line_length": 143, "alphanum_fraction": 0.6303418803}
const DiscordMessageEmbed = require('discord.js').MessageEmbed;

/** Command: welcome-channel
 *  Change or set the welcome channel for this server.
 */
module.exports = {
    name: 'explicit-content',
    description: 'Change the explict-content setting for this server.',
    args: true,
    usage: '<yes|true|ja|no|false|nein>',
    aliases: ['explicit', 'ec'],
    execute(message, args, guildConfig) {
        console.log(message.author.username + ' called "config/explicit-content" command' + ((args.length > 0) ? ' with args: ' + args : '.'));
        explictContent = args[0].toLowerCase();
        if (explictContent === 'yes' || explictContent === 'true' || explictContent === 'ja') {
            explictContent = true;
            message.client.guildManager.updateGuildConfigById(guildConfig.guildId, 'explictFilter', false);
        }
        else {
            explictContent = false;
            message.client.guildManager.updateGuildConfigById(guildConfig.guildId, 'explictFilter', true);
        }
        message.channel.send(new DiscordMessageEmbed()
            .setAuthor(message.author.tag, message.author.displayAvatarURL())
            .setColor('#33cc33')
            .setTimestamp()
            .setTitle('Updated explicit content settings')
            .setDescription('Explicit content is ' + (explictContent ? '**enabled**' : '**disabled**') + ' for this server.'));
    }
}