GithubHelp home page GithubHelp logo

wei / discord-actions-bot Goto Github PK

View Code? Open in Web Editor NEW
18.0 2.0 2.0 74 KB

๐Ÿค– A Discord Bot that helps with Action Items.

License: MIT License

JavaScript 94.74% TypeScript 1.37% Shell 0.26% Dockerfile 3.63%

discord-actions-bot's Introduction

discord-actions-bot

Installation

Install the Actions Bot.

Usage

/action-react

Create an action that requires users of a particular role to react with a โœ….

Follow the slash command prompt:

/action-react [role] [message]

Example:

/action-react @Pod 4.0.3 Due Friday: Complete Week 12 Survey

/action-thread

Create an action that requires users of a particular role to reply in a thread.

Follow the slash command prompt:

/action-thread [role] [message]

Example:

/action-thread @Pod 4.0.3 Friday December 17th: Post Standup Notes

/action-thread @Pod 4.0.3 Week 12 Retrospective

/action-poll

Create a poll that requires users of a particular role to vote by reacting.

Follow the slash command prompt:

/action-poll [role] [title] [options]

Example:

/action-poll @Pod 4.0.3 [What do you want to play at our game day?] [Skribbl, Gartic Phone, Among Us, Jack Box]

Self-hosting

Step 1: Create and Install Discord App

  1. Create a new Discord app.
  2. Go to the app's dashboard and create a bot user with SERVER MEMBERS INTENT turned on.
  3. Install the Discord Bot by going to https://discord.com/oauth2/authorize?client_id=${CLIENT_ID}&scope=bot%20applications.commands&permissions=446677109824

Step 2: Deployment

First, cp .env.example .env and fill in the required fields.

Method 1: Node Deployment

# Register Discord slash commands, only need to run this once
npm run deploy-commands

# Run the bot
npm start

Method 2: Docker Deployment

docker build -t discord-actions-bot .

# Register Discord slash commands, only need to run this once
docker run --rm --env-file .env \
  -v discord-actions-bot-db:/app/db \
  discord-actions-bot npm run deploy-commands

# Run the bot
docker run --name discord-actions-bot --env-file .env \
  -v discord-actions-bot-db:/app/db \
  discord-actions-bot

Journey

Idea

As a team that consists of a pod-leader and a fellow alumni, we decided to build an app that would make our lives easier.

Shifting from one platform to another to do simple everyday things like completing action items in Google Sheets and writing standup notes in GitHub Discussions was very tedious. So we decided to try and move those things to a platform of choice, Discord.

Implementation

We used Discord.js, Docker, and Tenor API.

With Discord.js, we were able to build the commands needed to serve the logic that the Action Bot follows. Such as deleting messages, updating lists, creating threads, and everything else has been done with Discord.js.

We also used Docker to create an image and serve the bot on a server. It should provide a seamless integration for anybody who would like to use the bot in their own Discord channels.

And finally, to make completing the actions fun, we added a random GIF that will show up when an action is completed by all pod members.

Results

In the few hours we put toward this hackathon project, we built a stable product that will let fellows complete their tasks without leaving Discord. It will let us keep everything within one platform to allow for better navigation and performance.

Future Plans

/action-remind (remind asap) || /action-set-reminder 3 (hours in advance)

Send friendly reminders to fellows to complete their standup notes (no need for messages).

/action-survey

Ask fellows for their feedback in a private thread to learn about their experiences in one platform (no third-party providers).

/action-meet-fellows

Match fellows for quick 1-1s where they can setup meetings in private threads.

Authors

Part of MLH Internal Hackathon 2021

discord-actions-bot's People

Contributors

dtemir avatar wei avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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.