Open Guthers opened 6 years ago
Tbh I don't see what needs to actually change here? At most a wrapper class for buttons?
Ah I see now - the web server bit
So this has blown out to implementing attachments in general with only implementing the link button specifically
@TRManderson There is a bit of functionality and requirements required (which as far as I have seen haven't being made anywhere. I am using this as a guide https://api.slack.com/docs/message-attachments#when_to_use_attachments. The actual api call will be quite simple but I want it to be simple af to add attachements (such as buttons) to a message
I'm confused. Isn't this just bot.post_message(channel, text, attachments="stuff")
?
How does one currently format those attachments tho? @mitchmcdee
isn't it in the document you linked? https://api.slack.com/docs/message-attachments#attachment_structure
I am trying to get a step away of needing to go into the docs, and providing an easy (and quick) way to add attachments like buttons
I reckon you'll just end up reading the docs anyway tbh
Ya this just seems like an abstraction of one facet of attachments and trades off reading their docs for reading yours. Additionally, they have pretty good docs already, and the structure looks pretty straight forward, so I don't think the abstraction is necessary
what you could do though is whip up an example of using buttons, say for !poll
or something, and that'd be a nice demonstration of attachments/buttons :^)
@mitchmcdee I am currently doing so. The idea originally came from @jdcaperon's work on the umart command for having links to the pages, as the links were quite long we are looking to not clutter screen real estate
Check out Max's Hoogle PR (#312) for ezmodo link formatting
Good example of call api required - https://github.com/slackapi/python-link-button-example/blob/master/example.py. Extended to work a bit nicer.
Additionally, will likely be similar to post_message with additional specification for the button(s)