/Paneka-discord-bot

Football data bot for discord written in python

Primary LanguagePythonMIT LicenseMIT

Paneka



GitHub contributors Hits

Click Here To invite the bot to your server!


Introduction

Football bot for discord written in python using discord.py and currenty hosted on heroku.

The API used for fetching football data is football-data.org's free tier and hence we have a rate limit of 10 Requests / Min and 12 Competitions.

Commands

1. Help

Displays the commands available for usage

usage: .help

help image

2. Standings All

Generates a more detailed table showing goals for, against, matches won and lost

usage: .standings-all [league code]

standings-all image

3. Standings

Generates the current standings in the requested league.

usage: .standings [league code]

standings image

4. Fixtures

Displays the next matches scheduled for the team or league requested.

usage: .fixtures [league code | team code] [limit: default 5]

Limit restricts the number of fixtures displayed and is by default 5

4.1 League Fixtures

League Fixtures image

4.2 Team Fixtures

Team Fixtures image

5. Live Scores

Displays the live scores of matches in league requested or team requested

usage: .live [league code | team code] [limit: default 5]

Limit restricts number of matches displayed and is by default 5

Team Fixtures image

6. Invite

Sends the URL to invite bot into servers as a Direct Message

usage: .invite

Invite Command image

How to run locally:

  • fork and clone repository
  • cd paneka/
    pip install -r requirements.txt
    
    #create a file '.env'
    touch .env
  • Become a discord developer and create a new bot
  • Copy the token under Build-A-Bot
  • Store the key in .env as follows:
    DISCORD_TOKEN=The Bot code
    NOTE: NO spaces around the '='
  • Get a free football-data API key from football-data.org
  • Store this key in .env on a new line as:
    API_KEY=The API code
    NOTE: NO spaces around the '='
  • python3 bot.py to run the bot
  • Add the bot to your guild(server) by inviting it using the OAuth2 link present in the developer application window
  • The bot is now ready :D

League Codes

All the supported leagues and their codes are listed below

League Code
Bundesliga
Germany
BL
Brazillian Serie A
Brazil
BSA
English Championship
England
ECL
Eredivisie
Netherlands
ERD
Ligue One
France
FL1
Premier League
England
PL
Primeira Liga
Porugal
PPL
Serie A
Italy
SA
La Liga
Spain
SPA

Credits:

Logo Courtesy: Icons made by Freepik from Flaticon