Laravel 文件未在 Slack RTM 驱动程序中接收?
File Not receiving in Slack RTM Driver with Laravel?
我目前正在尝试制作 Slack Bot。为此,我使用 https://botman.io 它的 Laravel.5 包装器。
问题是它对 Here.. 中提到的任何文本的响应。
这是我的工作代码
$botman->hears('hi', function ($bot) {
$bot->typesAndWaits(2);
$bot->reply('Hello!');
});
$botman->hears('ok', function ($bot) {
$bot->typesAndWaits(2);
$bot->reply('anything else!');
});
现在它工作正常,但是当我尝试使用接收到的任何文件时它没有响应,即使当我尝试接收任何图像时它也没有响应
这是我的代码
$botman->receivesImages(function($bot, $images) {
foreach ($images as $image) {
$url = $image->getUrl(); // The direct url
$title = $image->getTitle(); // The title, if available
$payload = $image->getPayload(); // The original payload
}
$bot->reply('image');
});
$botman->receivesFiles(function($bot, $files) {
foreach ($files as $file) {
$url = $file->getUrl(); // The direct url
$payload = $file->getPayload(); // The original payload
}
$bot->reply('rec!');
});
当我尝试使用后备并尝试上传 ay 文件时,我也有后备方法,它总是后备
这是所有正在使用的包
Botman
driver-slack
这似乎是一个包问题,我在 github 上提出了一个问题,他们发布了解决该问题的新版本
我目前正在尝试制作 Slack Bot。为此,我使用 https://botman.io 它的 Laravel.5 包装器。 问题是它对 Here.. 中提到的任何文本的响应。 这是我的工作代码
$botman->hears('hi', function ($bot) {
$bot->typesAndWaits(2);
$bot->reply('Hello!');
});
$botman->hears('ok', function ($bot) {
$bot->typesAndWaits(2);
$bot->reply('anything else!');
});
现在它工作正常,但是当我尝试使用接收到的任何文件时它没有响应,即使当我尝试接收任何图像时它也没有响应 这是我的代码
$botman->receivesImages(function($bot, $images) {
foreach ($images as $image) {
$url = $image->getUrl(); // The direct url
$title = $image->getTitle(); // The title, if available
$payload = $image->getPayload(); // The original payload
}
$bot->reply('image');
});
$botman->receivesFiles(function($bot, $files) {
foreach ($files as $file) {
$url = $file->getUrl(); // The direct url
$payload = $file->getPayload(); // The original payload
}
$bot->reply('rec!');
});
当我尝试使用后备并尝试上传 ay 文件时,我也有后备方法,它总是后备 这是所有正在使用的包 Botman driver-slack
这似乎是一个包问题,我在 github 上提出了一个问题,他们发布了解决该问题的新版本