Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
TelegramBot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
TelegramBot
Commits
b2ec9768
Commit
b2ec9768
authored
Apr 06, 2017
by
Jack'lul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add getBotId()
parent
f536baed
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
Telegram.php
src/Telegram.php
+20
-0
No files found.
src/Telegram.php
View file @
b2ec9768
...
...
@@ -46,6 +46,13 @@ class Telegram
*/
protected
$bot_name
=
''
;
/**
* Telegram Bot id
*
* @var string
*/
protected
$bot_id
=
''
;
/**
* Raw request data (json) for webhook methods
*
...
...
@@ -144,6 +151,9 @@ class Telegram
$this
->
api_key
=
$api_key
;
$this
->
bot_name
=
$bot_name
;
preg_match
(
"/([0-9]*)\:.*/"
,
$this
->
api_key
,
$matches
);
$this
->
bot_id
=
$matches
[
1
];
//Set default download and upload path
$this
->
setDownloadPath
(
BASE_PATH
.
'/../Download'
);
$this
->
setUploadPath
(
BASE_PATH
.
'/../Upload'
);
...
...
@@ -728,6 +738,16 @@ class Telegram
return
$this
->
bot_name
;
}
/**
* Get Bot Id
*
* @return string
*/
public
function
getBotId
()
{
return
$this
->
bot_id
;
}
/**
* Get Version
*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment