|
58 | 58 | g.desc 'This method posts an ephemeral message, which is visible only to the assigned user in a specific public channel, private channel, or private conversation.' |
59 | 59 | g.long_desc %( This method posts an ephemeral message, which is visible only to the assigned user in a specific public channel, private channel, or private conversation. ) |
60 | 60 | g.command 'postEphemeral' do |c| |
| 61 | + c.flag 'attachments', desc: 'A JSON-based array of structured attachments, presented as a URL-encoded string.' |
61 | 62 | c.flag 'channel', desc: 'Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name.' |
62 | 63 | c.flag 'text', desc: "Text of the message to send. See below for an explanation of formatting. This field is usually required, unless you're providing only attachments instead." |
63 | 64 | c.flag 'user', desc: 'id of the user who will receive the ephemeral message. The user should be in the channel specified by the channel argument.' |
64 | 65 | c.flag 'as_user', desc: 'Pass true to post the message as the authed user. Defaults to true if the chat:write:bot scope is not included. Otherwise, defaults to false.' |
65 | | - c.flag 'attachments', desc: 'A JSON-based array of structured attachments, presented as a URL-encoded string.' |
66 | 66 | c.flag 'blocks', desc: 'A JSON-based array of structured blocks, presented as a URL-encoded string.' |
| 67 | + c.flag 'icon_emoji', desc: 'Emoji to use as the icon for this message. Overrides icon_url. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below.' |
| 68 | + c.flag 'icon_url', desc: 'URL to an image to use as the icon for this message. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below.' |
67 | 69 | c.flag 'link_names', desc: 'Find and link channel names and usernames.' |
68 | 70 | c.flag 'parse', desc: 'Change how messages are treated. Defaults to none. See below.' |
69 | 71 | c.flag 'thread_ts', desc: "Provide another message's ts value to post this message in a thread. Avoid using a reply's ts value; use its parent's value instead. Ephemeral messages in threads are only shown if there is already an active thread." |
| 72 | + c.flag 'username', desc: "Set your bot's user name. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below." |
70 | 73 | c.action do |_global_options, options, _args| |
71 | 74 | puts JSON.dump($client.chat_postEphemeral(options)) |
72 | 75 | end |
|
0 commit comments