|
80 | 80 | g.long_desc %( Sends a message to a channel. ) |
81 | 81 | g.command 'postMessage' do |c| |
82 | 82 | c.flag 'channel', desc: 'Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name. See below for more details.' |
83 | | - c.flag 'text', desc: 'How this field works and whether it is required depends on other fields you use in your API call. See below for more detail.' |
84 | | - c.flag 'as_user', desc: 'Pass true to post the message as the authed user, instead of as a bot. Defaults to false. See authorship below. This argument may not be used with newer bot tokens.' |
| 83 | + c.flag 'as_user', desc: 'Pass true to post the message as the authed user, instead of as a bot. Defaults to false. See authorship below.' |
85 | 84 | c.flag 'attachments', desc: 'A JSON-based array of structured attachments, presented as a URL-encoded string.' |
86 | 85 | c.flag 'blocks', desc: 'A JSON-based array of structured blocks, presented as a URL-encoded string.' |
87 | | - c.flag 'icon_emoji', desc: 'Emoji to use as the icon for this message. Overrides icon_url. See authorship below. Use with bot tokens requires chat:write.customize.' |
88 | | - c.flag 'icon_url', desc: 'URL to an image to use as the icon for this message. See authorship below. Use with bot tokens requires chat:write.customize.' |
| 86 | + c.flag 'draft_id', desc: 'The id of the draft associated with the message.' |
| 87 | + 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.' |
| 88 | + 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.' |
89 | 89 | c.flag 'link_names', desc: 'Find and link channel names and usernames.' |
90 | 90 | c.flag 'mrkdwn', desc: 'Disable Slack markup parsing by setting to false. Enabled by default.' |
91 | 91 | c.flag 'parse', desc: 'Change how messages are treated. Defaults to none. See below.' |
92 | 92 | c.flag 'reply_broadcast', desc: 'Used in conjunction with thread_ts and indicates whether reply should be made visible to everyone in the channel or conversation. Defaults to false.' |
| 93 | + c.flag 'text', desc: 'How this field works and whether it is required depends on other fields you use in your API call. See below for more detail.' |
93 | 94 | c.flag 'thread_ts', desc: "Provide another message's ts value to make this message a reply. Avoid using a reply's ts value; use its parent instead." |
94 | 95 | c.flag 'unfurl_links', desc: 'Pass true to enable unfurling of primarily text-based content.' |
95 | 96 | c.flag 'unfurl_media', desc: 'Pass false to disable unfurling of media content.' |
96 | | - c.flag 'username', desc: "Set your bot's user name. See authorship below. Use with bot tokens requires chat:write.customize." |
| 97 | + 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." |
97 | 98 | c.action do |_global_options, options, _args| |
98 | 99 | puts JSON.dump($client.chat_postMessage(options)) |
99 | 100 | end |
|
125 | 126 | c.flag 'channel', desc: 'Channel ID of the message.' |
126 | 127 | c.flag 'ts', desc: 'Timestamp of the message to add unfurl behavior to.' |
127 | 128 | c.flag 'unfurls', desc: 'URL-encoded JSON map with keys set to URLs featured in the the message, pointing to their unfurl blocks or message attachments.' |
128 | | - c.flag 'user_auth_message', desc: 'Provide a simply-formatted string to send as an ephemeral message to the user as invitation to authenticate further and enable full unfurling behavior.' |
| 129 | + c.flag 'user_auth_blocks', desc: 'Provide a JSON based array of structured blocks presented as URL-encoded string to send as an ephemeral message to the user as invitation to authenticate further and enable full unfurling behavior.' |
| 130 | + c.flag 'user_auth_message', desc: 'Provide a simply-formatted string to send as an ephemeral message to the user as invitation to authenticate further and enable full unfurling behavior. Provides two buttons, Not now or Never ask me again.' |
129 | 131 | c.flag 'user_auth_required', desc: 'Set to true or 1 to indicate the user must install your Slack app to trigger unfurls for this domain.' |
130 | 132 | c.flag 'user_auth_url', desc: 'Send users to this custom URL where they will complete authentication in your app to fully trigger unfurling. Value should be properly URL-encoded.' |
131 | 133 | c.action do |_global_options, options, _args| |
|
0 commit comments