-
-
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
SlackRubyBot.config.token does not work? #240
Comments
Looks reasonable to me.
It should. Would be a bug.
Try to debug it, write a spec?
It's not necessary, just gives you a place to put your own code. You can instantiate an instance of Note that subclassing from base and auto-loading of commands could cause some potential problems with ordering of things, like #225. |
SlackRubyBot::Commands::Base
Duh, thanks for digging this up @wasabigeek. Care to PR support for |
I'm working on a Slack bot where I have one subclass of
SlackRubyBot::Commands::Base
per file. I also have my logger and Slack token that gets set within a Rails initializer file. What I have is equivalent to:Is this a reasonable structure? I didn't see anything in the README or examples to suggest otherwise
config.token
doesn't seem to work. I get the following stack trace when I run my code:But when I run my code like
SLACK_API_TOKEN=my-token-here bundle exec ruby my_slack_bot.rb
instead, it works as expectedIt seems odd to have an empty subclass of
SlackRubyBot::Bot
. Is that the right way to combine and run multiple subclasses ofSlackRubyBot::Commands::Base
?Thanks for your help
The text was updated successfully, but these errors were encountered: