Closed wardjallen closed 2 years ago
This worked for me. Set Response.files to the name of the file to be attached.
According to the code that the files
is passed to, you can only have one attachment for now even thought it accepts a list.
https://github.com/CiscoDevNet/webexteamssdk/blob/master/webexteamssdk/api/messages.py#L199
from webex_bot.models.command import Command
from webex_bot.models.response import Response
class AttachmentCommand(Command):
def __init__(self):
super().__init__(
command_keyword="attach",
help_message=f"Attach command",
)
def execute(self, message, attachment_actions, activity):
response = Response()
response.text = "Displayed when text only support"
response.markdown = "Displayed when **Markdown** support"
response.files = "./example.py"
return response
Thanks
How to reply multiple files, anyone have idea?
Description
Looking for an example of a response with file attachment