Giter Site home page Giter Site logo

swapnikkatkoori / sleeper-ff-bot Goto Github PK

View Code? Open in Web Editor NEW
34.0 8.0 18.0 785 KB

A GroupMe/Slack/Discord Bot for Sleeper fantasy leagues

License: MIT License

Python 99.84% Procfile 0.16%
groupme-bot slackbot python heroku discord-bot fantasy-football sleeper slack groupme discord

sleeper-ff-bot's Introduction

Version Build Status Version GitHub issues

This project was inspired by https://github.com/dtcarls/ff_bot.

Welcome to sleeper-ff-bot 👋

A GroupMe/Slack/Discord Bot for Sleeper fantasy leagues. It sends messages on the schedule below.

Current Schedule

  • Thursday:
    • 7pm ET Matchups for the week.
  • Friday:
    • 12pm ET Scores (Only does half ppr scores for now)
  • Sunday:
    • 7pm ET Close games.
  • Monday:
    • 12pm ET Scores (Only does half ppr scores for now)
    • 3pm ET Miracle Monday! Displays the close games with the number of playes remaining for each roster.
  • Tuesday:
    • 11am ET league standing.
    • 11:01am ET Highest scoring team, lowest scoring team, most points left on the bench, and teams that started players that scored negative.

Setup

  1. GroupMe
  2. Slack
  3. Discord

GroupMe

  • Step 1: Go to https://dev.groupme.com/ and log in using your groupme account.
  • Step 2: Click the bots tab.
  • Step 3: Click the "Create Bot" button.
  • Step 4: Choose the groupchat that the bot will be in and the Name of the bot and click "Submit". Everything else can be left empty.
  • Step 5: Remember the bot_id as you will need it in the next step.

  • Step 6: Follow directions to launch the bot on a Heroku server here

Slack

  • Step 1: Go to https://api.slack.com/apps and click "Create New App".
  • Step 2: Choose the name you want to call the FF bot, choose your workspace, and click "Create App".
  • Step 3: Click the "Incoming Webhooks" button.

  • Step 4: Click the "Off" toggle button so it says "On".

  • Step 5: Click the "Add New Webhook to Workspace" button.

  • Step 6: Select the channel to post to and click "Install".
  • Step 7: Remember the webhook that appears under the "Webhook URL" section as you will need it for the next step.

  • Step 8: Follow directions to launch the bot on a Heroku server here

Discord

  • Step 1: Go to the Discord server that you want to add the bot to.
  • Step 2: Go to "Server Settings".

  • Step 3: Click "Webhooks" in the side menu.
  • Step 4: Click "Create Webhook" and fill out the information.
  • Step 5: Copy the "Webhook Url" as you will need it in step 7.

  • Step 6: Click "Save".

  • Step 7: Follow directions to launch the bot on a Heroku server here

Deploy the bot

  • Step 1: Go to https://signup.heroku.com/login and create a Heroku account.

  • Step 2: Click this button to deploy the Bot: Deploy

  • Step 3: Choose an app name

  • Step 4:

For Groupme fill out the following (The BOT_TYPE needs to be groupme):

For Slack fill out the following (The BOT_TYPE needs to be slack):

For Discord fill out the following (The BOT_TYPE needs to be discord):

You can leave everything else as their default values.

  • Step 5: Click "Deploy app".
  • Step 6: After the deployment process is done, click "Manage app" and go to the "Resources" tab.
  • Step 7: Click the pencil icon next to worker and toggle it to the on position, and click "confirm".

And you are all done! The bot should now be deployed an you should get a welcome message.

Author

👤 Swapnik Katkoori

License

This project is licensed under the terms of the MIT license.

sleeper-ff-bot's People

Contributors

mkm8 avatar swapnikkatkoori avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sleeper-ff-bot's Issues

Bot didn’t post

Hey man! Not too worried considering it’s the first day of the season, but the bot didn’t post to my discord. Any thoughts?

2020 Season

Just wanted to see if this ever worked and is it going to work for the 2020 Season?

Planning to fix?

seems Like this bot is returning errors for 2021 sleeper. Fixable?

Not sure if it works?

I followed the steps for the groupme bot, deployed with heroku, but did not receive a welcome message. I'm unsure if its working since i didn't receive a message.

Any ideas? Or is this expected?

Error with the Bot

I just added this bot to my discord server and each day I am getting a welcome message for 2020 and not 2021 and today on the 3rd day of adding the bot I am getting this error: "There was an error that occurred with the bot: 'NoneType' object is not iterable"

is this functioning?

hello, just deployed the bot to my discord server and we're getting messages daily, will this live for 2022 season?

Discord issue - NoneType

I feel like i have a lot of issues lately sorry to be bothering you. Here’s a message from discord.

There was an error that occurred with the bot: unsupported format string passed to NoneType.format

Welcome message spam

I noticed that I'm receiving the welcome message repeatedly, even when making no changes to the setup myself. Roughly 2am Pacific daily, I have the bot saying hello, and presenting the schedule.

While I'm hopeful this will end when the season officially starts, I was curious if there's a way to prevent/disable the welcome message after the user confirms it was setup properly. I'd like to integrate this into my primary league chat, but currently I have it running in a test channel to avoid hitting that channel nightly :-)

In any case, thank you for your time invested into this!

Standings Object is wrong

My Edit to the api-wrapper made the standings object wrong.

line 412 should be changed:

  • string_to_add = "{0:^7} {1:^10} {2:>7} {3:>7}\n".format(i + 1, team_name, standing[1], standing[2])
  • string_to_add = "{0:^7} {1:^10} {2:>7} {3:>7}\n".format(i + 1, team_name, standing[1], standing[3])

Sorry I missed this.

Nice

It worked, easy set up. The bot showed up in my channel! Just wanted to let you know the auto message that was sent said "2020" season. Was curious to how much this has been updated since last season

I just have a question

Hey man! I love this bot, and to be honest, i have literally zero Idea of what im doing. I deployed the bot and its communicating with my discord. For Sleeper League ID, is it a full link, or just the League Number? I'll attach what I have now.
Screen Shot 2019-08-26 at 4 14 52 PM

And will the bot only start posting after the start of the season?

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.