![Logo](img/logo.png)
A chat application to view personalized fantasy football data.
View project website
Report Bug / Request Features
Table of Contents
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.
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.
- 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.
- Example: /league
- Retrieves all of the teams that are currently in your league.
- 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.
- Example: /standings
- Returns sorted standings (by seed) as well as statistics such as Wins, Losses, and Points for each team.
- 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.
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).
Feel free to self-host this bot, in case you would like your own support for private leagues.
- 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
- Create a Discord Bot or a Slack Bot
- Copy Discord Bot Token + Client ID, and Slack Token + App Token into environment variables shown as in
dev.bash
. - Run Postgres database somewhere and store the connection URL in the proper environment variable.
- (Optional) Store your ESPN credentials in COOKIE_VALUE. Copy
espn_s2
andSWID
from your browser's cookies. - Run
node update-discord.js
to create all commands for your discord bot, and also create them in the Slack app portal. - Run
docker compose up
to start the apps together
- 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)
Distributed under the MIT License. See LICENSE.txt
for more information.
Jarod Durkin - @jaroddurkin - [email protected]