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
35394a63
Commit
35394a63
authored
Oct 02, 2015
by
MBoretto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moving examples to CommandsExamples
parent
ac2bbc94
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
29 deletions
+15
-29
ForcereplyCommand.php
src/CommandsExamples/ForcereplyCommand.php
+2
-8
HidekeyboardCommand.php
src/CommandsExamples/HidekeyboardCommand.php
+3
-9
KeyboardCommand.php
src/CommandsExamples/KeyboardCommand.php
+9
-11
DB.php
src/DB.php
+1
-1
No files found.
src/Commands/ForcereplyCommand.php
→
src/Commands
Examples
/ForcereplyCommand.php
View file @
35394a63
...
...
@@ -41,16 +41,10 @@ class ForceReplyCommand extends Command
$data
[
'text'
]
=
'Write something:'
;
#$data['reply_to_message_id'] = $message_id;
$json
=
(
new
ForceReply
(
array
(
'selective'
=>
false
)
)
)
->
toJSON
();
$force_reply
=
new
ForceReply
([
'selective'
=>
false
]);
#echo $json;
$data
[
'reply_markup'
]
=
$
json
;
$data
[
'reply_markup'
]
=
$
force_reply
;
$result
=
Request
::
sendMessage
(
$data
);
...
...
src/Commands/HidekeyboardCommand.php
→
src/Commands
Examples
/HidekeyboardCommand.php
View file @
35394a63
...
...
@@ -41,15 +41,9 @@ class HidekeyboardCommand extends Command
$data
[
'text'
]
=
'Keyboard Hided'
;
#$data['reply_to_message_id'] = $message_id;
$json
=
(
new
ReplyKeyBoardHide
(
array
(
'selective'
=>
false
)
)
)
->
toJSON
();
$data
[
'reply_markup'
]
=
$json
;
$reply_keyboard_hide
=
new
ReplyKeyboardHide
([
'selective'
=>
false
]);
$data
[
'reply_markup'
]
=
$reply_keyboard_hide
;
$result
=
Request
::
sendMessage
(
$data
);
return
$result
;
...
...
src/Commands/KeyboardCommand.php
→
src/Commands
Examples
/KeyboardCommand.php
View file @
35394a63
...
...
@@ -84,18 +84,16 @@ class KeyboardCommand extends Command
unset
(
$keyboard
);
$json
=
(
new
ReplyKeyboardMarkup
(
array
(
'keyboard'
=>
$keyboards
[
1
]
,
'resize_keyboard'
=>
true
,
'one_time_keyboard'
=>
false
,
'selective'
=>
false
)
)
)
->
toJSON
();
$reply_keyboard_markup
=
new
ReplyKeyboardMarkup
(
[
'keyboard'
=>
$keyboards
[
1
]
,
'resize_keyboard'
=>
true
,
'one_time_keyboard'
=>
false
,
'selective'
=>
false
]
);
#echo $json;
$data
[
'reply_markup'
]
=
$
json
;
$data
[
'reply_markup'
]
=
$
reply_keyboard_markup
;
$result
=
Request
::
sendMessage
(
$data
);
return
$result
;
...
...
src/DB.php
View file @
35394a63
...
...
@@ -279,7 +279,7 @@ class DB
$sth2
->
bindParam
(
':id'
,
$chat_id
,
\PDO
::
PARAM_INT
);
$sth2
->
bindParam
(
':title'
,
$chat
->
getTitle
()
,
\PDO
::
PARAM_STR
,
255
);
$sth2
->
bindParam
(
':title'
,
$chat
->
getTitle
()
,
\PDO
::
PARAM_STR
,
255
);
$sth2
->
bindParam
(
':date'
,
$date
,
\PDO
::
PARAM_STR
);
$status
=
$sth2
->
execute
();
...
...
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