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
6f7e3611
Commit
6f7e3611
authored
Feb 28, 2016
by
Armando Lüscher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix commands that use conversations to use corrected methods.
parent
61d732cc
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
7 deletions
+6
-7
SendtochannelCommand.php
src/Commands/AdminCommands/SendtochannelCommand.php
+2
-2
CancelCommand.php
src/Commands/UserCommands/CancelCommand.php
+2
-2
SurveyCommand.php
src/Commands/UserCommands/SurveyCommand.php
+2
-3
No files found.
src/Commands/AdminCommands/SendtochannelCommand.php
View file @
6f7e3611
...
...
@@ -26,7 +26,7 @@ class SendtochannelCommand extends AdminCommand
protected
$name
=
'sendtochannel'
;
protected
$description
=
'Send message to a channel'
;
protected
$usage
=
'/sendtochannel <message to send>'
;
protected
$version
=
'0.1.
3
'
;
protected
$version
=
'0.1.
4
'
;
protected
$need_mysql
=
true
;
/**#@-*/
...
...
@@ -49,7 +49,7 @@ class SendtochannelCommand extends AdminCommand
// Conversation
$conversation
=
new
Conversation
(
$user_id
,
$chat_id
,
$this
->
getName
());
$conversation
->
start
();
$session
=
$conversation
->
getData
();
$channels
=
(
array
)
$this
->
getConfig
(
'your_channel'
);
...
...
src/Commands/UserCommands/CancelCommand.php
View file @
6f7e3611
...
...
@@ -30,7 +30,7 @@ class CancelCommand extends UserCommand
protected
$name
=
'cancel'
;
protected
$description
=
'Cancel the currently active conversation'
;
protected
$usage
=
'/cancel'
;
protected
$version
=
'0.1.
0
'
;
protected
$version
=
'0.1.
1
'
;
protected
$need_mysql
=
true
;
/**#@-*/
...
...
@@ -47,7 +47,7 @@ class CancelCommand extends UserCommand
$this
->
getMessage
()
->
getChat
()
->
getId
()
);
if
(
$conversation_command
=
$conversation
->
getCo
nversationCo
mmand
())
{
if
(
$conversation_command
=
$conversation
->
getCommand
())
{
$conversation
->
cancel
();
$text
=
'Conversation "'
.
$conversation_command
.
'" cancelled!'
;
}
...
...
src/Commands/UserCommands/SurveyCommand.php
View file @
6f7e3611
...
...
@@ -27,7 +27,7 @@ class SurveyCommand extends UserCommand
protected
$name
=
'survey'
;
protected
$description
=
'Survery for bot users'
;
protected
$usage
=
'/survey'
;
protected
$version
=
'0.1.
0
'
;
protected
$version
=
'0.1.
1
'
;
protected
$need_mysql
=
true
;
/**#@-*/
...
...
@@ -58,10 +58,9 @@ class SurveyCommand extends UserCommand
//tracking
$conversation
=
new
Conversation
(
$user_id
,
$chat_id
,
$this
->
getName
());
$conversation
->
start
();
//cache data from the tracking session if any
$session
=
$conversation
->
G
etData
();
$session
=
$conversation
->
g
etData
();
if
(
!
isset
(
$session
[
'state'
]))
{
$state
=
'0'
;
}
else
{
...
...
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