<commit_before><?php
namespace dash\social\telegram\commands;
// use telegram class as bot
use \dash\social\telegram\tg as bot;
use \dash\social\telegram\step;

class step_ticketAnswer
{
	public static function start($_cmd)
	{
		// its okay on start
		bot::ok();

		step::set('ticketNo', \dash\utility\convert::to_en_number($_cmd['optional']));
		step::start('ticketAnswer');

		// if start with callback answer callback
		if(bot::isCallback())
		{
			$result =
			[
				'text' => T_("Answer to ticket "). $_cmd['optional'],
			];
			bot::answerCallbackQuery($result);
		}

		return self::step1();
	}


	public static function step1()
	{
		step::plus();
		$txt_text = T_("Please wrote your answer");

		// empty keyboard
		$result =
		[
			'text'         => $txt_text,
			'reply_markup' =>
			[
				'keyboard' => [[T_('Cancel')]],
				'resize_keyboard' => true,
				'one_time_keyboard' => true

			],
		];
		bot::sendMessage($result);
	}


	public static function step2($_answer)
	{
		if(bot::isCallback())
		{
			$result =
			[
				'text' => T_("Please wrote your answer")." 📝",
				'show_alert' => true,
			];
			bot::answerCallbackQuery($result);
			return false;
		}

		$ticketNo = step::get('ticketNo');
		\dash\app\tg\ticket::answer($ticketNo, $_answer);

		step::stop();
	}
}
?><commit_msg>also add it on ticket answer<commit_after><?php
namespace dash\social\telegram\commands;
// use telegram class as bot
use \dash\social\telegram\tg as bot;
use \dash\social\telegram\step;

class step_ticketAnswer
{
	public static function start($_cmd)
	{
		// its okay on start
		bot::ok();

		step::set('ticketNo', \dash\utility\convert::to_en_number($_cmd['optional']));
		step::start('ticketAnswer');

		// if start with callback answer callback
		if(bot::isCallback())
		{
			$result =
			[
				'text' => T_("Answer to ticket "). $_cmd['optional'],
			];
			bot::answerCallbackQuery($result);
		}

		return self::step1();
	}


	public static function step1()
	{
		step::plus();
		$txt_text = T_("Please wrote your answer");

		// empty keyboard
		$result =
		[
			'text'         => $txt_text,
			'reply_markup' =>
			[
				'keyboard' => [[T_('Cancel')]],
				'resize_keyboard' => true,
				'one_time_keyboard' => true

			],
		];
		bot::sendMessage($result);
	}


	public static function step2($_answer)
	{
		if(bot::isCallback())
		{
			$result =
			[
				'text' => T_("Please wrote your answer")." 📝",
				'show_alert' => true,
			];
			bot::answerCallbackQuery($result);
			return false;
		}
		elseif(step::checkFalseTry($_ticketDetail))
		{
			return false;
		}

		$ticketNo = step::get('ticketNo');
		\dash\app\tg\ticket::answer($ticketNo, $_answer);

		step::stop();
	}
}
?>
{'fraction_non_alphanumeric': 0.18134328358208956, 'fraction_numerical': 0.002238805970149254, 'mean_word_length': 3.453488372093023, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 21, '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': '1079969', 'n_tokens_mistral': 1118, 'n_tokens_neox': 936, 'n_words': 186}