Botman typesAndWaits 添加初始延迟
Botman typesAndWaits adds initial delay
当我使用延迟 2 秒的 typesAndWaits
方法时,我必须等待 2 秒才能输入指示器显示,当它显示时我需要再等待 2 秒才能显示消息。
我正在使用 BotMan 聊天机器人服务。
这是我的代码:
$botman->hears('test', function (BotMan $bot) {
$bot->typesAndWaits(2);
$bot->reply('Prvo upiši svoje ime i prezime, i pritisnite SEND');
}
在 BotMan.php 文件中,转到第 583 行并替换
sleep($seconds);
有
usleep($seconds * 1000000);
那么它应该可以正常工作...
当我使用延迟 2 秒的 typesAndWaits
方法时,我必须等待 2 秒才能输入指示器显示,当它显示时我需要再等待 2 秒才能显示消息。
我正在使用 BotMan 聊天机器人服务。
这是我的代码:
$botman->hears('test', function (BotMan $bot) {
$bot->typesAndWaits(2);
$bot->reply('Prvo upiši svoje ime i prezime, i pritisnite SEND');
}
在 BotMan.php 文件中,转到第 583 行并替换
sleep($seconds);
有
usleep($seconds * 1000000);
那么它应该可以正常工作...