<commit_before>/**
 * Initialise child process
 */
const ytdl = require('ytdl-core');
const streamOptions = {
    seek: 0,
    volume: 0.5
};
const bot = require('./../bot');
module.exports = {};
exports = module.exports;
let guild = process.argv[2];
let voice_channel = process.argv[3];
let text_channel = process.argv[4];
let queue = [];
let voice_handler = null;
let voice_connection = null;
let stopped = false;
let inform_np = true;
let now_playing_data = {};
/**
 * List of commands
 */
const cmd = {
    play: function (url, user, channel) {
        let member = guild.member(bot.users.get(user));
        if (!url.includes("http")) {
            if (is_queue_empty())
                setTimeout(() => process.exit(), 1000);
        }
        console.log("QUEUE size" + queue.length);
        member.setVoiceChannel(voice_channel).catch(() => {
            message.reply("JOIN A VOICE CHANNEL");
            if (is_queue_empty())
                setTimeout(() => process.exit(), 1000);
        });
        if (text_channel == null)
            text_channel = channel;
        if (queue.length === 0) {
            voice_channel.join().then(connection => {
                voice_connection = connection;
                add_to_queue(url, user, channel);
            }).catch(console.error);
        } else {
            add_to_queue(url, user, channel);
        }
    },
    playnext: function () {
        if (voice_handler !== null) {
            message.reply("Skippin..");
            voice_handler.end();
        } else {
            play_next_song();
        }
    },
    clear: function (message, user, channel) {
        if (!guild.member(bot.users.get(user)).hasPermission("MOVE_MEMBERS")) {
            bot.channels.get(channel).sendMessage("Not Worthy");<commit_msg>Fix playnext<commit_after>/**
 * Initialise child process
 */
const ytdl = require('ytdl-core');
const streamOptions = {
    seek: 0,
    volume: 0.5
};
const bot = require('./../bot');
module.exports = {};
exports = module.exports;
let guild = process.argv[2];
let voice_channel = process.argv[3];
let text_channel = process.argv[4];
let queue = [];
let voice_handler = null;
let voice_connection = null;
let stopped = false;
let inform_np = true;
let now_playing_data = {};
/**
 * List of commands
 */
const cmd = {
    play: function (url, user, channel) {
        let member = guild.member(bot.users.get(user));
        if (!url.includes("http")) {
            if (is_queue_empty())
                setTimeout(() => process.exit(), 1000);
        }
        console.log("QUEUE size" + queue.length);
        member.setVoiceChannel(voice_channel).catch(() => {
            message.reply("JOIN A VOICE CHANNEL");
            if (is_queue_empty())
                setTimeout(() => process.exit(), 1000);
        });
        if (text_channel == null)
            text_channel = channel;
        if (queue.length === 0) {
            voice_channel.join().then(connection => {
                voice_connection = connection;
                add_to_queue(url, user, channel);
            }).catch(console.error);
        } else {
            add_to_queue(url, user, channel);
        }
    },
    playnext: function (message, user, channel) {
        if (voice_handler !== null) {
           bot.channels.get(channel).sendMessage("Skipping..");
            voice_handler.end();
        } else {
            play_next_song();
        }
    },
    clear: function (message, user, channel) {
        if (!guild.member(bot.users.get(user)).hasPermission("MOVE_MEMBERS")) {
            bot.channels.get(channel).sendMessage("Not Worthy");
{'fraction_non_alphanumeric': 0.15175851564663528, 'fraction_numerical': 0.008307947936859596, 'mean_word_length': 2.251125112511251, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '6396319', 'n_tokens_mistral': 1084, 'n_tokens_neox': 1043, 'n_words': 231}