ECS Discord Bot is a custom Discord bot designed specifically for the Emerald City Supporters. It enhances the user experience by managing match threads, providing real-time team statistics, handling ticket information, and more.
- Match Thread Management: Automatically create and manage match threads.
- Real-time Team Statistics: Fetch and display team statistics.
- Ticket Information Handling: Provide links and information for tickets.
- Weather Updates: Provide weather updates for match days.
- WooCommerce Integration: Integrate with WooCommerce for ticket sales.
- Admin Commands: Custom commands for bot management.
- Live Match Reporting: Provide live updates during matches.
- Member Verification: Verify ECS membership with order numbers.
- Pub League Team Management: Manage pub league teams and channels.
- Multiple League/Cup Support: Support for various leagues and cups.
To use the ECS Discord Bot, ensure you have the following environment variables set:
WC_KEY
: WooCommerce KeyWC_SECRET
: WooCommerce SecretBOT_TOKEN
: Discord Bot TokenURL
: Site URLTEAM_NAME
: MLS Team NameTEAM_ID
: ESPN Team IDOPENWEATHER_API_KEY
: OpenWeather API KeyVENUE_LONG
: Venue LongitudeVENUE_LAT
: Venue LatitudeFLASK_URL
: Flask URLFLASK_TOKEN
: Flask TokenDEV_ID
: Discord Developer IDADMIN_ROLE
: Discord Admin Role IDSERVER_ID
: Discord Server IDSERPAPI_API
: SerpApi KeyWP_USERNAME
: WordPress UsernameWP_APP_PASSWORD
: WordPress Application Password
The match_dates.json
file contains all known match dates for the current season. You can find your endpoint at ESPN Soccer Competitions. Select the competition and copy the last endpoint from the new URL (e.g., concacaf.league
from https://www.espn.com/soccer/league/_/name/concacaf.league
).
{
"matches": [
{ "date": "YYYYMMDD", "competition": "endpoint" }
]
}
- date:
YYYYMMDD
format - competition: ESPN endpoint for league/cup
- MLS:
usa.1
- US Open Cup:
usa.open
- FIFA Club World Cup:
fifa.cwc
- Concacaf:
concacaf.league
- Clone the Repository:
git clone https://github.com/yourusername/ECS-Discord-Bot.git cd ECS-Discord-Bot
- Install Required Dependencies:
pip install -r requirements.txt
- Set Up the
.env
File:WC_KEY=your_wc_key WC_SECRET=your_wc_secret BOT_TOKEN=your_bot_token URL=your_site_url TEAM_NAME=your_team_name TEAM_ID=your_team_id OPENWEATHER_API_KEY=your_openweather_api_key VENUE_LONG=your_venue_longitude VENUE_LAT=your_venue_latitude FLASK_URL=your_flask_url FLASK_TOKEN=your_flask_token DEV_ID=your_developer_id ADMIN_ROLE=your_admin_role_id SERVER_ID=your_server_id SERPAPI_API=your_serpapi_key WP_USERNAME=your_wp_username WP_APP_PASSWORD=your_wp_app_password
- Configure
match_dates.json
:- Add match dates and competitions.
- Run the Bot:
python ECS_Discord_Bot.py
- Execute the
/createschedule
Command as Admin:- This will update the schedule with new or changed information.
Contributions are welcome! If you'd like to contribute, feel free to fork the repository and submit a pull request. Please refer to the Contributing Guidelines for more details.
For support, questions, or suggestions, please contact the developer or submit an issue on the GitHub repository.
This project is licensed under the MIT License. See the LICENSE file for details.