<commit_before>const Command = require('../structures/Command');

class DelFavCommand extends Command {
	constructor() {
		super({
			name: 'delfav',
			description: 'Delete a favorite command',
			args: [
				{
					type: 'string',
					name: 'emoteName'
				}
			]
		});
	}

	async run(message, args, userData) {
		const { favoriteEmotes } = userData;
		if (!favoriteEmotes.hasOwnProperty(args.emoteName)) {
			return message.edit(`Emote \`${args.emoteName}\` not found on the favorites list!`).then(msg => msg.delete(3000));
		}
		delete favoriteEmotes[args.emoteName];
		message.client.logger.writeJSON(favoriteEmotes, './data/favoriteEmotes.json')
			.then(quotes => {
				message.edit(`Emote \`${args.emoteName}\` successfully removed from the favorites list!`).then(msg => msg.delete(2000));
			})
			.catch(err => {
				message.edit(`An error occurred writing to the file: \`\`\`${err}\`\`\``).then(msg => msg.delete(3000));
			});
	}
}

module.exports = DelFavCommand;<commit_msg>this made no sense lol<commit_after>const Command = require('../structures/Command');

class DelFavCommand extends Command {
	constructor() {
		super({
			name: 'delfav',
			description: 'Delete an emote from the favorites list',
			args: [
				{
					type: 'string',
					name: 'emoteName'
				}
			]
		});
	}

	async run(message, args, userData) {
		const { favoriteEmotes } = userData;
		if (!favoriteEmotes.hasOwnProperty(args.emoteName)) {
			return message.edit(`Emote \`${args.emoteName}\` not found on the favorites list!`).then(msg => msg.delete(3000));
		}
		delete favoriteEmotes[args.emoteName];
		message.client.logger.writeJSON(favoriteEmotes, './data/favoriteEmotes.json')
			.then(quotes => {
				message.edit(`Emote \`${args.emoteName}\` successfully removed from the favorites list!`).then(msg => msg.delete(2000));
			})
			.catch(err => {
				message.edit(`An error occurred writing to the file: \`\`\`${err}\`\`\``).then(msg => msg.delete(3000));
			});
	}
}

module.exports = DelFavCommand;
{'fraction_non_alphanumeric': 0.1729135432283858, 'fraction_numerical': 0.01199400299850075, 'mean_word_length': 3.8125, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5249806', 'n_tokens_mistral': 783, 'n_tokens_neox': 671, 'n_words': 138}