<commit_before>const request = require('request')
const Discord = require("discord.js");
const config = require('../../config.json');
const admins = config.admins;

module.exports = (bot) => {

function isCommander(id) {
	if(id === config.owner_id) {
		return true;
	}
	for(var i = 0; i < admins.length; i++){
		if(admins[i] == id) {
			return true;
		}
	}
	return false;
}

	bot.addTraditionalCommand('broadcast', message => {
	message.delete(1000)
	if (isCommander(message.author.id)) {
            var mes = message.content.split(" ").slice(1).join(" ");
            for(var i=0; i<bot.client.guild.length; i++) {
            message.channel.send(bot.client.guild[i].defaultChannel, mes);
            console.log(mes)<commit_msg>Update broadcast.js<commit_after>const request = require('request')
const Discord = require("discord.js");
const config = require('../../config.json');
const admins = config.admins;

module.exports = (bot) => {

function isCommander(id) {
	if(id === config.owner_id) {
		return true;
	}
	for(var i = 0; i < admins.length; i++){
		if(admins[i] == id) {
			return true;
		}
	}
	return false;
}

	bot.addCommand('broadcast', (payload) => {
	var message = payload.message
	if (isCommander(message.author.id)) {
            var mes = message.content.split(" ").slice(1).join(" ");
            for(var i=0; i<bot.client.guild.length; i++) {
            message.channel.send(bot.client.guild[i].defaultChannel, mes);
            console.log(mes)
{'fraction_non_alphanumeric': 0.18095238095238095, 'fraction_numerical': 0.006802721088435374, 'mean_word_length': 3.301169590643275, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '7218040', 'n_tokens_mistral': 526, 'n_tokens_neox': 502, 'n_words': 98}