-
-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Where can i find more info on the client.say method? #259
Comments
The say method is implemented here and is a wrapper on message which itself calls send_json which itself calls send_data to the slack connected real-time socket. What you're looking for is slack RTM docs on sending message, which explains the requirements for doing so. Other methods are documented in RTM parts of slack-ruby-client. I would greatly appreciate any README contributions that do a good job at linking/explaining this! |
Sorry it took me a while to get back to you. I looked at the implementation of the Just a follow up question, my app was actually created through the steps of the |
yes |
Hey its been a while. I've started writing something for the readme on my forked repo, and I've taken the liberty to create an index and i was wondering if that's okay or if its outside of the scope of what you're looking for. Also, this issue made me delve deeper into the code of the gem trying to figure out whats going on. I noticed that class Broadcast < SlackRubyBot::Commands::Base
def self.call(client, data, _match)
channels = client.web_client.channels_list
# parse the response and get the 'general' ch id
subs = Subscription.all()
subs.each do |sub|
client.say(channel: general_channel_id, text: "<@#{sub.user_id}>")
end
end
end Is this intentional? Am i supposed to use the |
You mean a TOC? You should add https://github.com/dblock/danger-toc and it will auto-generate and enforce one for you.
This is intentional. We hold the token that lets you call the Web API, so Note that |
One more note, The web API |
Yes! That's exactly what i meant. Thank you so much, everything is clearer now :) |
Hey evreyone, i'm using this gem for a personal project, nothing too fancy.
I'm stuck trying to get the bot send a message to the general channel when a "broadcast" command is invoked. This is my code snippet:
But this doesn't seem to work. On the other hand if i simply put the channel id, it works like a charm. Any clues on what I'm doing wrong? Also, what other methods do i have access to with client? I didn't find anything in the readme.
The text was updated successfully, but these errors were encountered: