Comments (3)
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
from webex_bot.
Thanks
from webex_bot.
How to reply multiple files, anyone have idea?
from webex_bot.
Related Issues (20)
- TypeError: 'staticmethod' object is not callable, when run the 'help' command - Bug HOT 1
- Future exception was never retrieved HOT 2
- default help card is annoying HOT 3
- webexteamssdk.exceptions.ApiError: [400] Bad Request - Unable to retrieve content HOT 2
- The card displayed for Help restricts the number of buttons to 5 HOT 3
- How to add more command_keyword
- Websockets.exceptions.ConnectionClosedError HOT 3
- Running webex_bot on Ubuntu 20.04 gets TypeError on action response
- Websocket connection through Proxy Server HOT 3
- How can we make bot to listen and respond to messages which do not reffer directly to it? Without bot being tagget in the message HOT 13
- Help get user info within command function.. HOT 1
- Bot not responding to messages with attachments (no log output either).
- Webex_bot do not work behind proxy HOT 1
- Bot webhook is setup but bot is not responding. Webhook does not seem to be be reciving anything HOT 18
- ModuleNotFoundError: No module named 'imp' HOT 4
- How to do multi-post responses HOT 1
- Commands not being received HOT 30
- Delete the card that shows up as part of pre_execute, when the next chained Command shows its own card
- Install FAILS with python3.12 on Ubuntu 22.04 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webex_bot.