add usage: send_audio($peer, $file)
This commit is contained in:
parent
c3ada33e3b
commit
d0391f4a7e
@ -48,4 +48,9 @@ class Base
|
|||||||
$msg = $this->escapeStringArgument($msg);
|
$msg = $this->escapeStringArgument($msg);
|
||||||
return $this->exec('msg ' . $peer . ' ' . $msg);
|
return $this->exec('msg ' . $peer . ' ' . $msg);
|
||||||
}
|
}
|
||||||
|
public function send_audio($peer, $file)
|
||||||
|
{
|
||||||
|
$peer = $this->escapePeer($peer);
|
||||||
|
return $this->exec('send_audio ' . $peer . ' ' . $file);
|
||||||
|
}
|
||||||
}
|
}
|
@ -5,6 +5,6 @@ if (preg_match("/^".TAG."tts (.*)$/", $_GET['text'], $matches)) {
|
|||||||
$file = fopen($_GET['from'].".mp3","w");
|
$file = fopen($_GET['from'].".mp3","w");
|
||||||
echo fwrite($file,$mp3);
|
echo fwrite($file,$mp3);
|
||||||
fclose($file);
|
fclose($file);
|
||||||
$BOT->exec("send_audio ".$from." /home/wwwroot/1.vps.dennx.com/".$_GET['from'].".mp3");
|
$BOT->send_audio($from, "/home/wwwroot/1.vps.dennx.com/".$_GET['from'].".mp3");
|
||||||
//unlink($matches[1].".mp3");
|
//unlink($matches[1].".mp3");
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user