Code Monkey home page Code Monkey logo

Comments (17)

skeet avatar skeet commented on August 21, 2024

Quick update:

I've not seen the "Invalid channel specified" error since prepending a hash to the room ID:-

cron.coffee:

sendMessage: (robot) ->
    envelope = user: @user, room: "#" + @user.room
    robot.send envelope, @message

Happy to make a PR if you think it's an issue.

from hubot-cron.

miyagawa avatar miyagawa commented on August 21, 2024

well if you do that it will break all other adapters.

from hubot-cron.

skeet avatar skeet commented on August 21, 2024

Your plugin doesn't work for Slack then.

from hubot-cron.

miyagawa avatar miyagawa commented on August 21, 2024

But in OP you said it works sometimes but sometimes doesn't? Can you spot the difference?

from hubot-cron.

skeet avatar skeet commented on August 21, 2024

Working "sometimes" makes it a completely non-viable option for Slack.

from hubot-cron.

miyagawa avatar miyagawa commented on August 21, 2024

@skeet geez, I meant: if you can tell the difference when it works and when it doesn't, we can figure out a fix to make it always work. Blindly adding '#' makes all adapters fail (and often fails on Slack either, assuming the original code sometimes works).

from hubot-cron.

miyagawa avatar miyagawa commented on August 21, 2024

I looked at the slack adapter and these change look suspicious:
slackapi/node-slack-sdk@9b45412
slackapi/hubot-slack#136

from hubot-cron.

skeet avatar skeet commented on August 21, 2024

Ok apologies, I misunderstood.

I agree that looks suspicious. I'm not familiar at all with how the Slack client works though I do believe all public Slack channels should start with a hash.

from hubot-cron.

miyagawa avatar miyagawa commented on August 21, 2024

@skeet can you note the versions of node-slack-client and hubot-slack you're currently using?

Apparently the issue is not released to npm yet on the node-slack-client/hubot-slack side, and I hope it gets fixed once they're shipped...

from hubot-cron.

skeet avatar skeet commented on August 21, 2024

hubot-slack: 2.2.0

I don't think I can get the version of node-slack-client as we connect to hubot via the Slack admin interface as an integration and I don't get any version information.

Yeah, let's hope so.

Cool, thanks for your help.

from hubot-cron.

miyagawa avatar miyagawa commented on August 21, 2024

I don't think I can get the version of node-slack-client as we connect to hubot via the Slack admin interface as an integration and I don't get any version information.

Hm, not sure if it's relevant :) I guess you can get the version by looking at:
node_modules/hubot-slack/node_modules/slack-client/package.json

from hubot-cron.

skeet avatar skeet commented on August 21, 2024

Ah, version 2.2.0 doesn't have any dependencies hence why I couldn't find it!

https://github.com/slackhq/hubot-slack/blob/2.2.0/package.json

from hubot-cron.

miyagawa avatar miyagawa commented on August 21, 2024

Aha, interesting. Thanks for checking :)

from hubot-cron.

tvmanikandan avatar tvmanikandan commented on August 21, 2024

I am using slack adapter. Please confirm how to use your module with slack adapter.

from hubot-cron.

tvmanikandan avatar tvmanikandan commented on August 21, 2024

skeet:,
How did you create the below command:
hubot new job 0 10 * * 1-5 "It's time for standup, folks!"

I am running the below command to invoke hubot , but then not able to figure out to create cron command like above.

my usage model:
bin/hubot -a slack => Loads all .js and .coffee files in scripts directory.

-Mani

from hubot-cron.

tvmanikandan avatar tvmanikandan commented on August 21, 2024

where do I find about creating hubot rooms, getting hubot room details , getting hubot users list ? Please let me know.

-mani

from hubot-cron.

skeet avatar skeet commented on August 21, 2024

@tvmanikandan I can run it locally just with:

bin/hubot

Then:

hubot> hubot new job 0 10 * * 1-5 "It's time for standup, folks!"
Job 867617 created

You maybe just have to follow the specific instructions for Slack? https://github.com/slackhq/hubot-slack

from hubot-cron.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.