Giter Club home page Giter Club logo

fantasybot_legacy's Introduction

Forks Stargazers Issues MIT License


Logo

FantasyBot

A chat application to view personalized fantasy football data.
View project website

Report Bug / Request Features

Table of Contents
  1. About The Project
  2. Commands
  3. Public Bot
  4. Self-Hosting
  5. Roadmap
  6. License
  7. Contact

About The Project

product-screenshot

FantasyBot is an application for Discord and Slack (with more coming soon) that allows you to view fantasy football data within the scope of the chat. Using an interface of commands, users can configure between ESPN Fantasy Football leagues (more services coming soon).

Information such as records, playoff seeding, current scores, and rosters are all available throughout this app.

Two options to use this app, you can use the publicly hosted application (join links also coming soon), or there are instructions below to self-host the app.

(Back to top)

Built With

(Back to top)

Commands

This bot comes with a number of commands that access data from your Fantasy Football league, with plenty more coming soon. In Discord they use the Slash Command API, and in Slack it uses slash commands from the bot API as well.

Before you use any commands for your league, you need to configure the server that you are currently in. This is done by using the config command.

Config

  • Example: /config (platform) (league ID)
  • Platform: The service that your fantasy football league is on (sleeper or espn)
  • League ID: The identifier for your given league. This is typically found in the URL when you're on the webpage for your league.

After the league is configured, you can use any of the other commands.

League

  • Example: /league
  • Retrieves all of the teams that are currently in your league.

Roster

  • Example: /roster (identifier)
  • Identifier: For ESPN, this is the abbreviation for your team (such as TEAM). For sleeper, this is your username.
  • Retrieves a given roster in your configured league.

Standings

  • Example: /standings
  • Returns sorted standings (by seed) as well as statistics such as Wins, Losses, and Points for each team.

Schedule

  • Example: /schedule (type) (value)
  • Type: (week or team) Two types, get all games in a single week, or get all games in a year for a single team.
  • Value: (number or identifier) If week, the schedule for the week number given. If team, the identifier for the team.

(Back to top)

Public Bot

Public links for both the Discord Bot and the Slack Bot will be ready in a future release. For usage now, feel free to self-host the bot(s).

(Back to top)

Self-Hosting

Feel free to self-host this bot, in case you would like your own support for private leagues.

Prerequisites

  • Docker
    docker pull node:18-buster-slim
    docker build -t fantasybot .
  • PostgreSQL
    • Host a Postgres database any way you like (AWS, Docker)
    • Store the connection string in an environment variable PG_CONNECTION.
  • Node.js (for development)
    npm install
    node DiscordBot.js
    node SlackBot.js

Installation

  1. Create a Discord Bot or a Slack Bot
  2. Copy Discord Bot Token + Client ID, and Slack Token + App Token into environment variables shown as in dev.bash.
  3. Run Postgres database somewhere and store the connection URL in the proper environment variable.
  4. (Optional) Store your ESPN credentials in COOKIE_VALUE. Copy espn_s2 and SWID from your browser's cookies.
  5. Run node update-discord.js to create all commands for your discord bot, and also create them in the Slack app portal.
  6. Run docker compose up to start the apps together

(Back to top)

Roadmap

  • ESPN Support + Basic Commands (v0.1)
  • Sleeper Support (v0.2)
  • Private ESPN Leagues for Public Bot (v0.3)
    • Public Bot Deployment
  • Yahoo Support (v0.4)
  • New Commands (v0.5)
  • GroupMe Bot (v0.6)

(Back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(Back to top)

Contact

Jarod Durkin - @jaroddurkin - [email protected]

(Back to top)

fantasybot_legacy's People

Contributors

jaroddurkin avatar

Watchers

 avatar

Forkers

d7hom

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.