Code Monkey home page Code Monkey logo

infobot's Introduction

SourceCred infobot

It's based on the Aracred & the Metagame bots. The changes made to suit the needs of SourceCred are:

  • the addition of 3 handlers : !read !watch !listen.

    • This will enable the bot to provide links to resources for newcomers
    • The links can be edited easily by the community in order to update the links
  • the simplification of the handler : "!" instead of "!ac"

  • some minor design & typo changes

Quickstart

Deploy

^^ Click here to deploy!

Quick end-user guide ๐Ÿฆ…

Interacting with the bot is simple; it offers a command with the ! flag:

  • "!help": Shows the available commands

Developer quick start ๐Ÿ‘ฉโ€๐Ÿ’ป

npm run dev will launch the bot locally, with hot reloading included.

There are a few other scripts provided:

  • start: Starts up the bot without hot reloading; used for the heroku deployment described below.
  • lint: Lints the project with ESLint.
  • test: Runs all the tests! (If you contribute some code, please do write tests for it โŒจ๏ธ!)

Configuration

For the bot to run properly, it needs these variables, laid out in the .env.sample file:

  • DISCORD_API_TOKEN: Your discord API token. See this guide on how to obtain one.
  • GITHUB_API_TOKEN: Your github API token. This will tie the bot's contributions to your profile.
  • GITHUB_FILE_PATH: The "file path" to the project.json folder, laid out with the format described here.
  • GITHUB_ADDRESS_FILE_PATH: The "file path" to the addressbook.json folder, laid out with the format described here.
  • WHITELISTED_CHANNELS: The whitelisted channels for the bot to read messages from, in the form of comma separated words, as in bot,general,channel. If you want the bot to listen to all channels, set this variable to *.

Deployment

You'll need a service to host this bot ๐Ÿ’†โ€โ™€๏ธ but do not despair! There's an easy, already configured way of doing this by deploying it to heroku! Just go through these steps:

  • Create a new Heroku app and link it to GitHub
  • Search for the repo and connect it
  • Enable "automatic deploys" for the app
  • BONUS: If you want to be able to run this bot 24/7, you can add link your billing info to Heroku, and will give you a 1000 hours for free, enough for a bot instance.

Contributing

Don't be shy to contribute even the smallest tweak. ๐Ÿฒ There are still some dragons to be aware of, but we'll be here to help you get started!

infobot's People

Contributors

benoxmo avatar crisog avatar evalir avatar luisivan avatar meta-dreamer avatar nicolas-law avatar omyzmo avatar yeqbfgxjiq 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.