将附件发送给团队中的机器人 [英] Send Attachments to Bot in Teams

查看:75
本文介绍了将附件发送给团队中的机器人的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在.NET C#中使用BotBuilder.

I'm working with BotBuilder in .NET C#.

我不知道如何使用Teams客户端向机器人发送附件-我尝试使用Windows桌面应用程序和Web客户端,但是在与机器人聊天时均未显示附件按钮.

I can't figure out how I can send an attachment to the bot using Teams client - I've tried using the Windows desktop app and the web client but neither shows an attachment button in a chat with the bot.

我也尝试使用Android客户端,发现我可以发送图像附件,但不能发送其他文件类型,然后我又回过头来,发现可以通过将图像粘贴到聊天框中来在台式机/Web客户端中执行相同的操作.

I also tried with the Android client and found that I could send image attachments but not other file types, which I then went back and found that I could do the same in desktop/web clients by pasting the image into the chat box.

使用此方法,我确实在Activity.AttachmentsContentType="image/*"中得到了一个项目.我尝试在Android客户端中附加的任何其他类型的文件都不会发送到bot(Activity.Attachments集合中没有任何内容),正如我所说的,其他客户端甚至不允许我在1:1聊天中附加任何内容

Using this method I do get an item in Activity.Attachments with ContentType="image/*". Any other type of file that I try to attach in the Android client is not sent to the bot (nothing in the Activity.Attachments collection) and as I said the other clients won't allow me to even attach anything in 1:1 chat.

在团队频道中附加文件会将文件添加到频道中,但是如果我提到机器人与附件,则我对该附件没有任何引用.

Attaching a file in a Teams Channel adds the file to the Channel but I don't get any reference to the attachment if I @mention the bot along with the attachment.

我能找到的唯一通过Teams发送的关于使用bot的附件的信息是

The only mention of consuming attachments in bot sent via Teams I can find is here where it's stated that you'll need to use a JwtToken to access the file. I'm guessing this is currently a limitation in Teams as I'm able to send/receive attachments from other channels, but I'd like to confirm that there isn't some nuance that I'm missing.

推荐答案

当前,Microsoft Teams不支持将非图像文件发送到bot的功能.

Currently, Microsoft Teams does not support the ability to send non-image files to bots.

我们目前正在努力提供此功能,但我们尚无ETA.

We are currently working on delivering this feature, but we do not yet have an ETA.

这篇关于将附件发送给团队中的机器人的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆