pzelnip/slackcmd

Slack requiring mapping a Incoming WebHook to a channel

dylangrafmyre opened this issue · 1 comments

Hello,

When I added a new Incoming Webhook to Slack, I was required to Choose a Channel to associate with the Webhook. I don't know if things have changed since you first wrote this script, but I was able to edit:

parser.add_argument('-c','--channel', help='Channel to post to', required=False)
AND comment out :

ensure channel has pound sign

#if args['channel'][0] not in ['#', '@']:
 #   args['channel'] = '#' + args['channel']

This disable the required argument -c Channel since Slack was pigeonholing me to just one mapped channel anyway.

While the webhook is specified for a specific channel, this is the "default" channel that webhook will spit output to. Having -c be required was a conscious design choice, as the intended use for this script was to redirect command line output to a named room.