Closed sts10 closed 4 years ago
What did you pass as channel? It takes something like C1234567890
oooh is that like a channel ID or something? I was just passing it #general
, which worked for send_message
, so I just assumed it would work for read_channel
.
What's the best way to get that ID of a particular channel?
True that can take either. Hmm. The easiest way to see and test is to open a channel on a web browser and you can see the id in the URL.
The easiest way to see and test is to open a channel on a web browser and you can see the id in the URL.
This worked! And feeding that "ID" into my read_channel
function works as expected. Thanks!
I'll close this issue for now, but it might be nice to note this ID requirement in the documentation somewhere?
It's in the real docs, sort of https://api.slack.com/methods/channels.history Glad it worked
Running into something strange, hoping y'all can help (though it may not be an issue with this crate — if that's uncalled for, feel free to close/delete, my bad):
I'm trying to make a Slack bot that needs to read a channel's history and send messages to that channel. I've got it sending messages just fine, using this function:
But when I try to read the same channel's history, I keep getting the same error: "ChannelNotFound". My read_channel function (below) is very similar to the
channel_history.rs
example given in this repo.Also, I can successfully list all channels, using the other code example in this repo. The channel(s) I've tried reading is in this outputted list!
Any ideas? I've tried with multiple channels, some public and some private. I also tried having a
#
before the channel name and not having it. PS. I know both of these functions should likely return a Result of some kind — I'm just trying to get it up and running.