{"size": 484, "ext": "js", "max_stars_repo_path": "commands/reactionroles/bind.js", "max_stars_repo_name": "Frovu/krebs-bot", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "commands/reactionroles/bind.js", "max_issues_repo_name": "Frovu/krebs-bot", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "commands/reactionroles/bind.js", "max_forks_repo_name": "Frovu/krebs-bot", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 30.25, "max_line_length": 77, "alphanum_fraction": 0.6508264463}
const rroles = require('../../modules/reactionRoles');

module.exports = {
	name: 'bindmessage',
	permissions: 'ADMIN',
	exec: async function(message) {
		const split = message.content.split(/\s+/g);
		const id = split[1];
		const m = id && await message.channel.messages.fetch(id).catch(()=>{});
		if (!m)
			return await message.channel.send(`Failed to find message: \`${id}\``);
		rroles.bind(m);
		return await message.channel.send(`new reactionRole message: \`${m.id}\``);
	}
};
