GithubHelp home page GithubHelp logo

00mjk / yahoo-fantasy-bot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from landonpatmore/yahoo-fantasy-bot

0.0 0.0 0.0 4.79 MB

Bot that alerts GroupMe, Discord, and Slack users about various things happening in their Yahoo Fantasy Sports league.

License: MIT License

Kotlin 80.02% HTML 0.89% JavaScript 17.32% SCSS 1.58% CSS 0.19%

yahoo-fantasy-bot's Introduction

Deploy

Note: Frontend does not work in safari (v3.0.0)

Feel free to contribute!

Current Roadmap

  • Kotlin (because why not :?)
  • Reactive X
  • Docker Support
  • More in depth messages
  • Respond to chat commands from various messaging services
  • Clean up code

Auto-deploys do not happen automatically. You will need to come back and click the "Deploy" button again to get the latest bot. It will reset everything. Just follow all the steps again and you will be good!

Yahoo Fantasy Bot

Bot that alerts GroupMe, Slack, and Discord users about various things happening in their Yahoo Fantasy Football League.

What it does:

League Transaction Alerts

  • ADD
  • DROP
  • ADD/DROP
  • TRADE
  • COMMISH CHANGES

What it can do:

  • You can customize all alerts and send them whenever and however many times you want!

Follow these steps EXACTLY!

  1. Click the Deploy to Heroku button at the top. It will auto-deploy the application to Heroku.
  2. Name the application whatever you would like.
  3. Follow the below section.

(REQUIRED) Setting up Yahoo API

You will need a Yahoo Access Token, Client ID, and Client Secret for this bot to work.

  1. Go to https://developer.yahoo.com/apps/
  2. Click "Create an App" button

  1. Fill out required information.
  • Name the application whatever you would like
  • Click "Installed Application"
  • The Redirect URI will be https://<the name of your application>.herokuapp.com/auth
  • Click "Fantasy Sports" and then "Read"
  • Click "Create App"

  1. You will see your: Yahoo Client ID and Client Secret. Save these for later.

  1. To get your league ID: (2 Ways)

On the website

  • Go to Yahoo Fantasy Football and click your league
  • Go to settings page
  • At the top, you will see "League ID", save for later

In the app

  • Open the app
  • Click "League" tab
  • Click "Settings" at the top
  • At the top, you will see "League ID#", save for later

  1. The following sections are all optional, but at least one of them is needed. All of them can be used as well!

(The following sections were taken from dtcarls/ff_bot as the steps are the exact same. They are tweaked a little bit.)


(Optional) GroupMe Setup

Click to expand

Go to www.groupme.com and sign up or login

If you don't have one for your league already, create a new "Group Chat"

Next we will setup the bot for GroupMe

Go to https://dev.groupme.com/session/new and login

Click "Create Bot"

Create your bot. GroupMe does a good job explaining what each thing is.

After you have created your bot you will see something similar to this. Click "Edit"

This page is important as you will need the "Bot ID" on this page.You can also send a test message with the text box to be sure it is connected to your chat room. Side note: If you use the bot id depicted in the page you will spam an empty chat room so not worth the effort

---

(Optional) Slack setup

Click to expand

Go to https://slack.com/signin and sign in to the workspace the bot will be in

If you don't have one for your league already, create a new League Channel

Next we will setup the bot for Slack

Go to https://api.slack.com/apps/new

Name the app, and choose the intended workspace from the dropdown.

Select the Incoming Webhooks section on the side.

Change the toggle from Off to On.

Select Add New Webhook to Workspace

In the Post to dropdown, select the channel you want to send messages to, then select Authorize.

This page is important as you will need the "Webhook URL" on this page.

---

(Optional) Discord setup

Click to expand

Log into or create a discord account

Go to or create a discord server to receive messages in

Open the server settings

Go to Webhooks

Create a webhook, give it a name and pick which channel to receive messages in

Save the "Webhook URL" on this page

---
  1. Follow the below section.

Heroku Setup

  1. Go to your dashboard. Now you will need to setup your environment variables so that it works for your league. Click Settings at your dashboard. Then click "Reveal Config Vars" button and you will see something like this.

  1. Fill out all the variables (You can have any combination of messaging services (0..n).)
  2. Click "Deploy App". This will automatically configure the dynos and run all required scripts to create the bot. (this will take a bit)
  3. Click "Overview"
  4. Click "Configure Dynos" and turn on the "web" and "bot" dyno
  5. Click "Open App" at the top right
  6. Follow the setup
  7. Once you are authorized you can add all types of alerts for your league!
  8. IMPORTANT: Once done adding alerts, Click "Configure Dynos" and turn OFF the "web" dyno (failing to do this will put your bot to sleep because of heroku policy, thus your bot will not function.)

You are all set! Enjoy the bot!

License

MIT License

Copyright (c) 2018 Landon Patmore

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

yahoo-fantasy-bot's People

Contributors

ap4open avatar bryan-farris avatar dependabot[bot] avatar dmcp89 avatar eightysixed avatar landonpatmore avatar markwhat1 avatar oblidioblida avatar ptoninato avatar whosnickdoglio 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.