<commit_before>'use strict';

const path = require('path');
const fs = require('fs');

const pkg = require('./package.json');
const TokenStore = require('./lib/token-store');

module.exports = function(SupinBot) {
	var config = SupinBot.config.loadConfig(require('./lib/config'));
	module.exports.config = config;
	module.exports.SupinBot = SupinBot;

	var tokenStoreInstance = new TokenStore(config.get('tokenLength'), SupinBot.config.get('redis'), config.get('redisDb'), config.get('ttl'));
	module.exports.tokenStoreInstance = tokenStoreInstance;

	const routes = require('./routes/index');

	SupinBot.WebApp.registerRoute(pkg.name, '/sct', 'SCT Access', routes);

	SupinBot.CommandManager.addCommand('scttoken', function(user, channel, args, argsStr) {
		var token = tokenStoreInstance.createToken(args[0]);
		SupinBot.postMessage(channel.id, `SCT Access Token created: *${token}*`);
	})
	.setDescription('Generates an access token to let SCT post to the chat.')
	.addArgument('Session duration in minutes', 'int', config.get('cookie.duration'))
	.adminOnly();
};
<commit_msg>Fixed generator issue in the command<commit_after>'use strict';

const path = require('path');
const fs = require('fs');
const co = require('co');

const pkg = require('./package.json');
const TokenStore = require('./lib/token-store');

module.exports = function(SupinBot) {
	var config = SupinBot.config.loadConfig(require('./lib/config'));
	module.exports.config = config;
	module.exports.SupinBot = SupinBot;

	var tokenStoreInstance = new TokenStore(config.get('tokenLength'), SupinBot.config.get('redis'), config.get('redisDb'), config.get('ttl'));
	module.exports.tokenStoreInstance = tokenStoreInstance;

	const routes = require('./routes/index');

	SupinBot.WebApp.registerRoute(pkg.name, '/sct', 'SCT Access', routes);

	SupinBot.CommandManager.addCommand('scttoken', function(user, channel, args, argsStr) {
		co(function*() {
			var token = yield tokenStoreInstance.createToken(args[0]);
			SupinBot.postMessage(channel.id, `SCT Access Token created: *${token}*`);
		});
	})
	.setDescription('Generates an access token to let SCT post to the chat.')
	.addArgument('Session duration in minutes', 'int', config.get('cookie.duration'))
	.adminOnly();
};

{'fraction_non_alphanumeric': 0.16681534344335414, 'fraction_numerical': 0.0008920606601248885, 'mean_word_length': 5.880368098159509, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '28095', 'n_tokens_mistral': 704, 'n_tokens_neox': 689, 'n_words': 154}