Created
September 21, 2018 20:50
-
-
Save flexgrip/1eb27dc04624b2810521667b09df1324 to your computer and use it in GitHub Desktop.
types and waits on originated and replies
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function sendTypesAndWaits($seconds) { | |
Log::info('Send typesAndWaits'); | |
$response = $this->bot->sendRequest('me/messages', [ | |
'recipient' => $this->recipient, | |
'sender_action' => 'typing_on' | |
]); | |
# If request worked, sleep for same number of seconds. | |
if(isset($response)) {sleep($seconds);} | |
return $response; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment