Skip to content

Instantly share code, notes, and snippets.

@flexgrip
Created September 21, 2018 20:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flexgrip/1eb27dc04624b2810521667b09df1324 to your computer and use it in GitHub Desktop.
Save flexgrip/1eb27dc04624b2810521667b09df1324 to your computer and use it in GitHub Desktop.
types and waits on originated and replies
<?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