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
f4b203bd
Commit
f4b203bd
authored
Oct 13, 2015
by
MBoretto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix and README
parent
7283a1d4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
README.md
README.md
+5
-2
Request.php
src/Request.php
+1
-1
No files found.
README.md
View file @
f4b203bd
...
...
@@ -249,7 +249,10 @@ $telegram->addCommandsPath($COMMANDS_FOLDER);
Inside
*CommandsExamples/*
there are some sample that show how to use types.
### Admin Commands
Enabling this feature, the admin bot can perform some super user command like send message to all.
Enabling this feature, the admin bot can perform some super user command like:
-
Send message to all chats
-
List all the chats started with the bot (new!)
You can specify one or more admin with this option:
```
php
...
...
@@ -285,7 +288,7 @@ print_r($results);
```
### Logging
Thrown Exception are stored in TelegramException.log file.
Thrown Exception are stored in TelegramException.log file
(in the base directory)
.
Incoming update (json string from webhook and getUpdates) can be logged on a text file, set those options with the methods:
```
php
...
...
src/Request.php
View file @
f4b203bd
...
...
@@ -158,7 +158,7 @@ class Request
if
(
$result
===
false
)
{
throw
new
TelegramException
(
curl_error
(
$ch
),
curl_errno
(
$ch
));
}
if
(
empty
(
$result
))
{
if
(
empty
(
$result
)
|
is_null
(
$result
)
)
{
throw
new
TelegramException
(
'Empty server response'
);
}
...
...
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