-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
33 lines (26 loc) · 746 Bytes
/
index.php
File metadata and controls
33 lines (26 loc) · 746 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/');
define('SRC_PATH', ABSPATH . '/includes/src/');
ob_start();
include(ABSPATH . 'includes/config.php');
include(ABSPATH . 'includes/request.php');
include(ABSPATH . 'includes/telegram.php');
include(ABSPATH . 'includes/database.php');
include(ABSPATH . 'includes/bot.php');
// Your bot is loaded down here.
include(ABSPATH . 'includes/src/mybot.php');
ob_end_flush();
date_default_timezone_set(TIMEZONE);
ini_set("log_errors", 1);
ini_set("error_log", ERROR_LOG);
$bot = null;
try {
// Your bot is initialized down here.
$bot = new MyBot();
$bot->onCommand(); // Returns boolean.
} catch (Exception $e) {
error_log($e->getMessage());
}
$bot->db->close();
?>