<commit_before>const r = require('../../../db.js');
const i18n = require('i18n');

module.exports.info = {
	aliases: [
		'locale',
		'lang',
		'i18n',
		'langue',
		'langage',
		'locail',
		'internationalisation',
		'internationalization',
		'lugar'
	],
	ratelimit: 1000
};

module.exports.command = (message) => {
	if (message.input && Object.keys(i18n.getCatalog()).includes(message.input)) {
		r.table('i18n')
			.insert({
				id: message.inbox,
				lang: message.input
			}, {
				conflict: 'update'
			})
			.run(r.conn, (err) => {
				if (err) {
					message.channel.createMessage(message.__('err_generic'));
				} else {
					message.setLocale(message.input);
					message.channel.createMessage(message.__('locale_set', { locale: message.input }));
				}
			});
	} else {
		message.channel.createMessage(message.__('locale_incorrect', { locales: Object.keys(i18n.getCatalog()).join(', ') }));
	}
};
<commit_msg>Surround each language with code<commit_after>const r = require('../../../db.js');
const i18n = require('i18n');

module.exports.info = {
	aliases: [
		'locale',
		'lang',
		'i18n',
		'langue',
		'langage',
		'locail',
		'internationalisation',
		'internationalization',
		'lugar'
	],
	ratelimit: 1000
};

module.exports.command = (message) => {
	if (message.input && Object.keys(i18n.getCatalog()).includes(message.input)) {
		r.table('i18n')
			.insert({
				id: message.inbox,
				lang: message.input
			}, {
				conflict: 'update'
			})
			.run(r.conn, (err) => {
				if (err) {
					message.channel.createMessage(message.__('err_generic'));
				} else {
					message.setLocale(message.input);
					message.channel.createMessage(message.__('locale_set', { locale: message.input }));
				}
			});
	} else {
		message.channel.createMessage(message.__('locale_incorrect', { locales: Object.keys(i18n.getCatalog()).map(lang => `\`${lang}\``).join('`, `') }));
	}
};

{'fraction_non_alphanumeric': 0.2059447983014862, 'fraction_numerical': 0.016985138004246284, 'mean_word_length': 3.575242718446602, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, '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': '6869893', 'n_tokens_mistral': 799, 'n_tokens_neox': 680, 'n_words': 97}