Giter Site home page Giter Site logo

cts_slack_bot's Introduction

A bot for the CTS Slack

Currently the bot is blue_falcon.py

Installation

Using Poetry

  1. Ensure you have the appropriate authentication keys, located at: Slack API: Applications | Slack
  2. download the code, install dependencies with poetry
    git clone https://github.com/Continue-to-Serve/cts_slack_bot.git
    cd cts_slack_bot
    poetry install
        
  3. if using direnv create .envrc - rename .envrc template and fill in tokens
  4. authorize .envrc file
    direnv allow
        

Running the Bot

start poetry shell and run bot

poetry shell
python blue_falcon.py

Current Functionality

It greets to members when they join and asks them to introduce themselves.

Configuration

The message and channel can be customized by changing the values in config.toml Notably, it currently supports the variables user_id and channel_id when enclosed in {}. Slack converts these into the links if they are further enclosed in <> with a leader @ or # (user and channel, respectively)

Example: <@{user_id}> or <@{channel_id}> These can also be expressed explicitly with, for example <@U0196V8A137> would be replaced with my current display name.

Development Information

Uses the slack bolt sdk, in socket mode. The authentication data is stored in environment variables: SLACK_OAUTH SLACK_APP_TOKEN

I am using direnv to manage them in a .envrc file which is autoloaded when the directory is accessed. This can be done manually with the commands:

export SLACK_OAUTH=[OAUTH TOKEN HERE]
export SLACK_APP_TOKEN=[APP TOKEN HERE]

currently using poetry to manage dependencies, see file:./pyproject.toml

cts_slack_bot's People

Contributors

burningshed avatar

Watchers

James Cloos avatar  avatar

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.