GithubHelp home page GithubHelp logo

botina-slack's Introduction

botina-slack

bot for slack

Creating the BOT App

First of all you need to create the app and install in your channel. Use the manifest below to replicate the bot in your slack channel. Follow the documentation here

display_information:
  name: Botina BOT
features:
  app_home:
    home_tab_enabled: false
    messages_tab_enabled: true
    messages_tab_read_only_enabled: false
  bot_user:
    display_name: Botina
    always_online: true
oauth_config:
  scopes:
    bot:
      - channels:history
      - channels:join
      - channels:read
      - chat:write
      - commands
      - im:history
      - users:read
settings:
  event_subscriptions:
    bot_events:
      - message.channels
      - message.im
  interactivity:
    is_enabled: true
  org_deploy_enabled: false
  socket_mode_enabled: true
  token_rotation_enabled: false

Running the BOT

to run the bot configs the envs, install dependencies and make sure it is installed in your channel

config the envs specific for your slack channel:

  • token
  • app token
  • signing token

install the dependencies

yarn

having the tokens already configured run the bot with

yarn start

dont forget to install the bot in your slack

botina-slack's People

Contributors

daniloab avatar

Stargazers

 avatar  avatar

Watchers

 avatar

botina-slack's Issues

git compare

  • get the base reff: usually the last tag of release
  • get the head ref: main head branch

daily thread

  • read message Reminder: Daily thread.
  • when received starts a flow name scheduleManualDailyThreadReminder
  • find a way to schedule to run 1hour after
  • when run get the thread message for it day
  • see who do not answer
  • set a new message on thread selecting those do not answer

requests tests

{
  init: 'https://slack.com/api/conversations.list',
  options: {
    headers: {
      Authorization: 'Bearer '
    }
  },
  json: {
    ok: true,
    channels: [
      {
        id: 'C03MMFU7PAS',
        name: 'geral',
        is_channel: true,
        is_group: false,
        is_im: false,
        is_mpim: false,
        is_private: false,
        created: 1656588621,
        is_archived: false,
        is_general: true,
        unlinked: 0,
        name_normalized: 'geral',
        is_shared: false,
        is_org_shared: false,
        is_pending_ext_shared: false,
        pending_shared: [],
        context_team_id: 'T03MWG732FN',
        parent_conversation: null,
        creator: 'U03NHSA09LY',
        is_ext_shared: false,
        shared_team_ids: [ 'T03MWG732FN' ],
        pending_connected_team_ids: [],
        is_member: true,
        topic: { value: '', creator: '', last_set: 0 },
        purpose: {
          value: 'Este é o único canal que sempre incluirá todos. É um ótimo local para anúncios e conversas entre toda a equipe.',
          creator: 'U03NHSA09LY',
          last_set: 1656588621
        },
        previous_names: [],
        num_members: 3
      },
      {
        id: 'C03MR6NP3RT',
        name: 'fintech',
        is_channel: true,
        is_group: false,
        is_im: false,
        is_mpim: false,
        is_private: false,
        created: 1656588657,
        is_archived: false,
        is_general: false,
        unlinked: 0,
        name_normalized: 'fintech',
        is_shared: false,
        is_org_shared: false,
        is_pending_ext_shared: false,
        pending_shared: [],
        context_team_id: 'T03MWG732FN',
        parent_conversation: null,
        creator: 'U03NHSA09LY',
        is_ext_shared: false,
        shared_team_ids: [ 'T03MWG732FN' ],
        pending_connected_team_ids: [],
        is_member: false,
        topic: { value: '', creator: '', last_set: 0 },
        purpose: {
          value: 'Este *canal* é para trabalhar em um projeto. Faça reuniões, compartilhe documentos e tome decisões em conjunto com sua equipe.',
          creator: 'U03NHSA09LY',
          last_set: 1656588657
        },
        previous_names: [],
        num_members: 0
      },
      {
        id: 'C03MWG75TA8',
        name: 'outros-assuntos',
        is_channel: true,
        is_group: false,
        is_im: false,
        is_mpim: false,
        is_private: false,
        created: 1656588622,
        is_archived: false,
        is_general: false,
        unlinked: 0,
        name_normalized: 'outros-assuntos',
        is_shared: false,
        is_org_shared: false,
        is_pending_ext_shared: false,
        pending_shared: [],
        context_team_id: 'T03MWG732FN',
        parent_conversation: null,
        creator: 'U03NHSA09LY',
        is_ext_shared: false,
        shared_team_ids: [ 'T03MWG732FN' ],
        pending_connected_team_ids: [],
        is_member: false,
        topic: { value: '', creator: '', last_set: 0 },
        purpose: {
          value: 'Este canal é para... bem, todo o restante. É um lugar para piadas da equipe, ideias repentinas e GIFs engraçados. Divirta-se!',
          creator: 'U03NHSA09LY',
          last_set: 1656588622
        },
        previous_names: [],
        num_members: 1
      }
    ],
    response_metadata: { next_cursor: '' }
  },
  ok: true,
  status: 200,
  curl: "curl 'https://slack.com/api/conversations.list'"
}

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.