Sha256: 5f99909ef19664161cfc8d721221bc5d42b09c5f20f7fc138a4db34ee9684787
Contents?: true
Size: 520 Bytes
Versions: 19
Compression:
Stored size: 520 Bytes
Contents
class SlackSmartBot def get_channels_name_and_id #todo: add pagination for case more than 1000 channels on the workspace channels = client.web_client.conversations_list( types: "private_channel,public_channel", limit: "1000", exclude_archived: "true", ).channels @channels_id = Hash.new() @channels_name = Hash.new() channels.each do |ch| unless ch.is_archived @channels_id[ch.name] = ch.id @channels_name[ch.id] = ch.name end end end end
Version data entries
19 entries across 19 versions & 1 rubygems