Creating a channel in Slack using Ruby [closed]

痴心易碎 提交于 2019-12-12 06:42:41

问题


I'm trying to create a channel using the https://github.com/dblock/slack-ruby-client gem.

But it keeps on coming up with an error ":Name missing"

Can anyone give me a code snippet for creating channels with Slack please.

Dave


回答1:


Just looking at the source, you would do:

client = Slack::Web::Client.new(token: 'your_token')
client.channels_create(name: "my_channel_name")


来源:https://stackoverflow.com/questions/37657390/creating-a-channel-in-slack-using-ruby

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!