Skip to content

khalmurad/CLFramework

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CLFramework - CFL micro framework

API PHP CURL

Telegram Bot API Foydalanish uchun yaratilgan
Telegram Support Group Telegram Guruximiz

Ornatish - composer orqali

composer require coderlast/clframework

Composer orqali yuklaganigizdan kegin

config.php - fayl yarating va uni ichiga 👇

$config = [
	"TOKEN"=>"bot tokeni",
];

Kegin index.php fayl yaratamiz va uni ichiga 👇

<?php
require "vendor/autoload.php";
require "config.php";

//
use App\CoderLast\Framework;
use App\CoderLast\Plugins;
//
$bot = new Framework($config['TOKEN']);
$plugins = new Plugins($config['TOKEN']);


$home = [["Hello word!", "Hello word !"]];

$input = $bot->getInput();
if(isset($input->message)){
	$message = $input->message;
	$chat_id = $message->chat->id;
	$text = $message->text;
	$userid	= $message->from->id;
	$name = $message->from->frist_name." ".$message->from->last_name;
}

if($text == "/start"){
	$bot->sendMessage($userid,"CLFramework - $name",[
		'parse_mode'=>"markdown",
		'reply_markup'=>$plugins->Keyboards($home)
		]);
}
elseif($text == "Hello word!"){
	$a = $bot->getMethod();
	$bot->sendMessage($chat_id, print_r($a,true));
}

elseif($text == "Hello word !"){
	$a = $plugins->getMethod();
        $bot->sendMessage($chat_id, print_r($a,true));
}

Copyright © 2020 CoderLast

About

Coderlast Tomonidan Telegram Botchilar uchun shpargalka

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%