Code Monkey home page Code Monkey logo

Comments (8)

dblock avatar dblock commented on June 21, 2024 2
  • slack-ruby-bot will continue be developed ? (i will ask Slack because for me it is still not clear is that ok with xoxb tokens and without URL redirect, for me was much useful to use opened connection to Slack)

It will for as long as Slack supports RTM apps in any form or shape. I have half a dozen bots using it with hundreds of paying customers, and haven't had the energy to migrate them all, yet.

  • in case if i would still need migrate to slack-ruby-bot-server, how i can save current flow without additional nice features )
    • bot just have connection to slack

This is no longer necessary because events are sent by Slack to your bot. So there's no "connection" anymore. If you don't want 1-click "add to slack" install type of thing that is available to the public, you can probably just remove that functionality from your own bot. It would definitely be useful to have a way to do this more easily, too, PRs welcome.

    • listen everything in channels

If you set the right permissions (I am not sure exactly what permissions you need to listen to everything) it will just work.

    • reply on messages @mybot help

There's no no-pain solution here, but I tried to minimize the work required by writing https://github.com/slack-ruby/slack-ruby-bot-server-events-app-mentions which is sort of very close to the functionality of the slack-ruby-bot alone. It does reply to mentions.

See https://code.dblock.org/2020/11/30/migrating-classic-slack-ruby-bots-to-granular-permissions.html for lots of detail.

I'll close this, but feel free to add more questions!

from slack-ruby-bot.

dblock avatar dblock commented on June 21, 2024 1

@dblock that is good question, when i create granular directly i got error about bad token not_allowed_token_type

Oh I see. You can't start an RTM client unless you have a legacy RTM token, even with granular permissions. Still, feels like you should just not be doing RTM at all.

from slack-ruby-bot.

dblock avatar dblock commented on June 21, 2024 1

Oh socket mode is yet another thing! I opened slack-ruby/slack-ruby-bot-server#141 for that if anyone wants to contribute.

from slack-ruby-bot.

mr-exz avatar mr-exz commented on June 21, 2024

Got answer from Slack support.
Answer:

If you createed a classic app, get it working, then migrate to a granular app (and it all works), then you will be all set and won't need to do anything else !
In short, if you get your app working as a granular app, you will be as future proofed as you can be.

Basically flow will to migrate from really legacy bots:

  1. create classic app
  2. add bot features
  3. migrate to granular permissions
  4. add in workspace
  5. set xoxb- token for SLACK_API_TOKEN variable
  6. success

from slack-ruby-bot.

dblock avatar dblock commented on June 21, 2024

@mr-exz I am confused why you'd want to do this and not create an app with granular permissions in the first place?

from slack-ruby-bot.

mr-exz avatar mr-exz commented on June 21, 2024

@dblock that is good question, when i create granular directly i got error about bad token not_allowed_token_type

from slack-ruby-bot.

mr-exz avatar mr-exz commented on June 21, 2024

it require many changes in application, so i need more time, thx for clarification will create separate task for myself to migrate from RTM

from slack-ruby-bot.

mr-exz avatar mr-exz commented on June 21, 2024

Answer from Slack Support
RTM is only available with Classic Apps, not New Apps so you won't be able to upgrade it to the latest granular permissions:

https://api.slack.com/rtm

We don't have plans to deprecate Classic Apps at this stage (no time frame) so you can still use them for now. However it is possible that this could change (you would receive a warning to then update before this happened though).

We recommend moving to Socket Mode if possible:

https://api.slack.com/apis/connections/socket

You can see a list of events that are supported in Socket Mode (Events API) vs RTM below. Anything not listed as Events API but shows as RTM is not possible with Socket Mode.

https://api.slack.com/events

from slack-ruby-bot.

Related Issues (20)

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.