Giter VIP home page Giter VIP logo

slack-bot's Introduction

Alfred Pennyworth (aka Batman's Butler)

About

This bot is only written in Java (with Docker and MakeFile to deploy) and is a bot in slack where the user can get a daily quote or checkup a GitHub user and then check her/his repositories one at the time.

This project uses api's from https://quotes.rest/qod for quotes, https://api.github.com/users/ for getting github users and repositories, https://www.harmannenfalt.no/api and https://www.hardovrefalt.no/api for getting info about the mountains Mannen and Dovre have fallen or not.

Functionality

  • Daily quote will be sent every day at 09:15

  • /quote returns a daily quote

  • /mannen responds with a message if the mountain Mannen has fallen or not

  • /dovre responds with a message if the mountain Dovre has fallen or not

  • /github <Username> returns the user if they exist

  • Select a repository and information will be returned about it.

(I used this website to check how the JSON's should look before posting them to slacks api)

Templates

See Templates for better understanding of all toJson() functions.

Technologies

  • TomCat
  • Java
  • Maven
  • Docker

Frameworks

  • Spring Boot
  • Hibernate

You will need

  • Docker
  • maven
  • make
  • git

Requirements

  • Open port 8080
  • make sudo apt install make
  • mvn sudo apt install maven
  • docker sudo apt install docker.io -y

Deployment

  1. Clone this repository git clone https://gitlab.com/BredeFK/alfred.git
  2. Open Dockerfile and add all environment variables
  3. Run make build

SonarQube

  1. Download and start SonarQube server
  2. run mvn clean verify sonar:sonar
  3. or run mvn sonar:sonar if project is unchanged

Makefile

  • make build
  • make clean
  • make run
  • make status

Managing deployment

  • To check logs on running deployment screen -r
  • To check status and ID on running container docker container ls
  • To stop deployment docker container stop <CONTAINER ID> or screen -r and ctrl + c

Bonus

  • This project has a nice front-end for error page.
  • It has an Privacy Policy.
  • It will soon track ip address and give location in logs, but not store them!

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.