{"size": 444, "ext": "js", "max_stars_repo_path": "catalog/GameBot JS/commands/clan_join.js", "max_stars_repo_name": "derwear/bots.hub", "max_stars_repo_stars_event_min_datetime": "2021-08-31T14:27:38.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-28T14:52:47.000Z", "max_issues_repo_path": "catalog/GameBot JS/commands/clan_join.js", "max_issues_repo_name": "derwear/bots.hub", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "catalog/GameBot JS/commands/clan_join.js", "max_forks_repo_name": "derwear/bots.hub", "max_forks_repo_forks_event_min_datetime": "2021-08-31T15:50:45.000Z", "max_forks_repo_forks_event_max_datetime": "2022-02-25T09:48:42.000Z"}
{"max_stars_count": 8, "max_issues_count": null, "max_forks_count": 4, "avg_line_length": 31.7142857143, "max_line_length": 74, "alphanum_fraction": 0.6328828829}
let users = require('../bot/base/users.json');
let clans = require('../bot/base/clans.json');
let command = {
	pattern: /^(?:вступить)\s(.*)$/i,
	f: async (message, bot) => {
		if(bot.user.clan !== '') return bot.reply(`❌ Вы уже состоите в клане!`);
		if(!clans[message.args[1]]) return bot.reply(`❌ Клан не найден!`);

		users[message.senderId].clan = message.args[1];
		return bot.reply(`Вы вступили в клан.`);
	}
}

module.exports = command;