<commit_before><?php

namespace App\Jobs;

use App\Http\Controllers\LiarsDiceBotController;
use BotMan\BotMan\BotMan;
use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;

class ProcessMessage implements ShouldQueue
{
    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;

    protected $bot;
    protected $liars_dice;

    /**
     * The number of times the job may be attempted.
     *
     * @var int
     */
    public $tries = 1;

    /**
     * Create a new job instance.
     *
     * @return void
     */
    public function __construct(BotMan $bot)
    {
        $this->bot = $bot;
        $this->liars_dice = new LiarsDiceBotController;
    }

    /**
     * Execute the job.
     *
     * @return void
     */
    public function handle()
    {
        $msg_txt = strtolower($this->bot->getMessage()->getText());

        if($msg_txt == 'start game') {
            $this->liars_dice->start($this->bot);
        } elseif(preg_match('/^([1-9]{0,1}[0-9]+(,|\.)[0-6])$/', $msg_txt)) {
            $this->liars_dice->playRound($this->bot);
        } elseif(preg_match('/^play liar.*$/', $msg_txt)) {
            $this->liars_dice->host($this->bot);
        } elseif($msg_txt == 'liar') {
            $this->liars_dice->playRound($this->bot);
        } elseif($msg_txt == 'abort game') {
            $this->liars_dice->abort($this->bot);
        } elseif(preg_match('/^say .*$/i', $msg_txt)) {<commit_msg>Fixing some upper/lowercase stuff!<commit_after><?php

namespace App\Jobs;

use App\Http\Controllers\LiarsDiceBotController;
use BotMan\BotMan\BotMan;
use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;

class ProcessMessage implements ShouldQueue
{
    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;

    protected $bot;
    protected $liars_dice;

    /**
     * The number of times the job may be attempted.
     *
     * @var int
     */
    public $tries = 1;

    /**
     * Create a new job instance.
     *
     * @return void
     */
    public function __construct(BotMan $bot)
    {
        $this->bot = $bot;
        $this->liars_dice = new LiarsDiceBotController;
    }

    /**
     * Execute the job.
     *
     * @return void
     */
    public function handle()
    {
        $msg_txt = $this->bot->getMessage()->getText();

        if(strtolower($msg_txt) == 'start game') {
            $this->liars_dice->start($this->bot);
        } elseif(preg_match('/^([1-9]{0,1}[0-9]+(,|\.)[0-6])$/', $msg_txt)) {
            $this->liars_dice->playRound($this->bot);
        } elseif(preg_match('/^play liar.*$/', strtolower($msg_txt))) {
            $this->liars_dice->host($this->bot);
        } elseif(strtolower($msg_txt) == 'liar') {
            $this->liars_dice->playRound($this->bot);
        } elseif(strtolower($msg_txt) == 'abort game') {
            $this->liars_dice->abort($this->bot);
        } elseif(preg_match('/^say .*$/i', $msg_txt)) {
{'fraction_non_alphanumeric': 0.16234779893849516, 'fraction_numerical': 0.00561973150171714, 'mean_word_length': 2.661714285714286, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 43, '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': '785760', 'n_tokens_mistral': 1078, 'n_tokens_neox': 1099, 'n_words': 185}