Giter Site home page Giter Site logo

yuelabot's Introduction

travis-ci status Maintainability Test Coverage

Open in Gitpod

Quick Start

Click the gitpod button above to launch into a pre-configured cloud IDE. All you have to do is setup your bot token in .env, then run bundle exec ruby main.rb

Prerequisites

  • Ruby
  • Postgres*

* You can change the database driver in ./config/database.yml if you so desire. You'll need to include the associated gem in the Gemfile as well.

Installation instructions

bundle install will install the dependencies for the project

rake db:create will create the database

rake db:migrate will run the database migrations

How to run

There needs to be a file called config in the config directory. This file is functionally a .env file, with the following keys:

discord=<Your discord api key>
google=<A google api key>
search_id=<The search engine id for your custom search engine>
reddit_secret=<Reddit secret for .. reddit>
reddit_clientid=<Reddit api client id>
reddit_user=<Your reddit username>
reddit_pass=<Your reddit password>
admins=<A comma delimited list of discord user ids, who can do administration tasks on the bot>
open_weather_key=<An open weather map api key>
wordnik_key=<API key for wordnik>
github_access_token=<Access token for github, for submitting issues>

The following keys are optional, and are only used for proxying chat.stackoverflow.com to a discord channel:

room_id=<The so chat room id>
channel_id=<The discord channel ID you want to proxy the SO chat to>
so_user=<A SO chat user>
so_pass=<The password for the SO chat user>

Once the file is there, you can run the bot with:

bundle exec ruby main.rb

Debugging

You can pause executation at any line by calling byebug.

You can read byebug's documentation here: https://github.com/deivid-rodriguez/byebug

Basically it pauses executation and drops you in a console in the executation context for you to fuck around in

yuelabot's People

Contributors

joshleblanc avatar kamilczak020 avatar kendfrey avatar xbenjii avatar zirak 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.