{"size": 1093, "ext": "js", "max_stars_repo_path": "src/commands/moderation/unmute.js", "max_stars_repo_name": "sr229/Rin", "max_stars_repo_stars_event_min_datetime": "2020-10-13T13:50:32.000Z", "max_stars_repo_stars_event_max_datetime": "2020-10-13T13:50:32.000Z", "max_issues_repo_path": "src/commands/moderation/unmute.js", "max_issues_repo_name": "sr229/Rin", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/commands/moderation/unmute.js", "max_forks_repo_name": "sr229/Rin", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 28.7631578947, "max_line_length": 98, "alphanum_fraction": 0.6495882891}
module.exports = {
	async run(message, args, colors) {
		let member = message.mentions.members.first() || await message.guild.members.fetch(`${args[1]}`)
		.catch(e => {
			message.channel.send('', {
				embed: {
					title: 'Incorrect command usage',
					description: 'Please provide a user to unmute.',
					color: colors.error
				}
			});
		});
		if (member == undefined) return; 
		
		message.client.unmute(message.guild, member)
		.then(()=>{
			message.channel.send({embed:{
				title: 'User unmuted',
				description: `${member.toString()} unmuted by ${message.author.toString()}`,
				color: colors.success
			}})
		}).catch(e=>
			message.channel.send({embed:{
				title: 'Unable to unmute user',
				description: e.message||e,
				color: colors.error
			}})
		);
	},
	description: 'Unmutes a given member',
	detailed: 'Unmutes given member with the option to add a reason for the unmute.',
	examples: prefix => `${prefix}unmute @Jihyo#2423, ${prefix}unmute 157101769858613248`,
	name: 'unmute',
	permissions: ['MANAGE_ROLES'],
	botPermissions: ['MANAGE_ROLES'],
	guildOnly: true
}
