{"size": 918, "ext": "js", "max_stars_repo_path": "src/commands/resetlike.js", "max_stars_repo_name": "MatthieuCoder/IA", "max_stars_repo_stars_event_min_datetime": "2020-05-26T21:43:14.000Z", "max_stars_repo_stars_event_max_datetime": "2021-03-30T23:55:32.000Z", "max_issues_repo_path": "src/commands/resetlike.js", "max_issues_repo_name": "MatthieuCoder/IA", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/commands/resetlike.js", "max_forks_repo_name": "MatthieuCoder/IA", "max_forks_repo_forks_event_min_datetime": "2020-05-26T23:55:58.000Z", "max_forks_repo_forks_event_max_datetime": "2021-06-18T18:40:04.000Z"}
{"max_stars_count": 25, "max_issues_count": null, "max_forks_count": 5, "avg_line_length": 31.6551724138, "max_line_length": 94, "alphanum_fraction": 0.674291939}
const Command = require("../structure/Command");

module.exports = class Resetlike extends Command {
	constructor() {
		super({
			name: "resetlike",
			category: "music",
			aliases: ["resetlikes"],
			description: "The command deletes all the beloved musics",
			usage: "{{prefix}}resetlike",
			cooldown: 0
		});
	}

	run(client, message, _args) {
		if (!client.usersEntry.has(message.author.id)) {
			client.usersEntry.set(message.author.id, client.extends.user.userPost(message.author.id));
			console.log(`[userEntry] Create configurations for ${message.author.tag}`);
		}

		const data = client.usersEntry.get(message.author.id);
		if (data.like.length === 0) return message.channel.send("You didn't like any music");

		data.like.splice(data.like, data.like.length);
		client.usersEntry.set(message.author.id, data);

		message.channel.send("👍🏻 Your likes has been cleared!");
	}
};