Skip to content

Commit e113006

Browse files
committed
updates
1 parent 5e48629 commit e113006

3 files changed

Lines changed: 85 additions & 9 deletions

File tree

config.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
$config = [
4+
'TOKEN'=>"",
5+
'ADMINNAME'=>"",
6+
"DataBase"=>[
7+
'host'=>'hostname',
8+
'user'=>'username',
9+
'password'=>'password',
10+
'dbname'=>'databasename',
11+
],
12+
];

docs/index.md

Lines changed: 35 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,37 @@
1-
<h1 align="center">CLFramework - CFL micro framework</h1>
1+
## Welcome to GitHub Pages
22

3-
[![API](https://img.shields.io/badge/CLFramework-Mart%2007%2C%202021-36ade1.svg)](https://core.telegram.org/bots/api)
4-
![PHP](https://img.shields.io/badge/php-%3E%3D7.4-8892bf.svg)
5-
![CURL](https://img.shields.io/badge/cURL-required-green.svg)
3+
You can use the [editor on GitHub](https://github.com/Coderlast/CLFramework/edit/master/docs/index.md) to maintain and preview the content for your website in Markdown files.
64

7-
<div align="center">
8-
<a href="https://core.telegram.org/bots/api">Telegram Bot API</a> <b>Foydalanish uchun yaratilgan</b>
9-
<br>
10-
<a href="https://telegram.me/Clframework">Telegram Support Group</a> <b>Telegram Guruximiz</b>
11-
</div>
5+
Whenever you commit to this repository, GitHub Pages will run [Jekyll](https://jekyllrb.com/) to rebuild the pages in your site, from the content in your Markdown files.
6+
7+
### Markdown
8+
9+
Markdown is a lightweight and easy-to-use syntax for styling your writing. It includes conventions for
10+
11+
```markdown
12+
Syntax highlighted code block
13+
14+
# Header 1
15+
## Header 2
16+
### Header 3
17+
18+
- Bulleted
19+
- List
20+
21+
1. Numbered
22+
2. List
23+
24+
**Bold** and _Italic_ and `Code` text
25+
26+
[Link](url) and ![Image](src)
27+
```
28+
29+
For more details see [GitHub Flavored Markdown](https://guides.github.com/features/mastering-markdown/).
30+
31+
### Jekyll Themes
32+
33+
Your Pages site will use the layout and styles from the Jekyll theme you have selected in your [repository settings](https://github.com/Coderlast/CLFramework/settings/pages). The name of this theme is saved in the Jekyll `_config.yml` configuration file.
34+
35+
### Support or Contact
36+
37+
Having trouble with Pages? Check out our [documentation](https://docs.github.com/categories/github-pages-basics/) or [contact support](https://support.github.com/contact) and we’ll help you sort it out.

index.php

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?php
2+
require "vendor/autoload.php";
3+
require "config.php";
4+
//
5+
use App\CoderLast\Framework;
6+
use App\CoderLast\Plugins;
7+
//
8+
$bot = new Framework($config['TOKEN']);
9+
$plugins = new Plugins($config['TOKEN']);
10+
11+
$home = [["Hello word!", "Hello word!"]];
12+
13+
$input = $bot->getInput();
14+
if(isset($input->message)){
15+
$message = $input->message;
16+
$chat_id = $message->chat->id;
17+
$text = $message->text;
18+
$userid = $message->from->id;
19+
$name = $message->from->first_name." ".$message->from->last_name;
20+
}
21+
22+
switch ($text)
23+
{
24+
case "/start":
25+
$bot->sendMessage($userid,"CLFramework - $name",[
26+
'parse_mode'=>"markdown",
27+
'reply_markup'=>$plugins->Keyboards($home)
28+
]);
29+
break;
30+
case "Hello word!":
31+
$a = $bot->getMethod();
32+
$bot->sendMessage($chat_id, print_r($a,true));
33+
break;
34+
case "Hello word !":
35+
$a = $plugins->getMethod();
36+
$bot->sendMessage($chat_id, print_r($a,true));
37+
break;
38+
}

0 commit comments

Comments
 (0)