2024-11-10 21:22:50 -05:00

72 lines
2.4 KiB
Markdown

# Discord Scores Bot
**Discord Scores Bot** is a powerful, user-friendly bot designed to bring real-time college sports scores and updates directly to your Discord server. Whether you follow college football or basketball, this bot keeps you up-to-date with live game information, final scores, and upcoming match schedules.
## Features
- **Live Score Updates**: Get real-time scores for ongoing games.
- **Upcoming Matches**: Check when your favorite teams are playing next.
- **Final Scores**: View results from completed games.
- **Team Search**: Search for scores using team names.
- **Date & Week Specification**: Specify dates (e.g., `MM/DD`) for basketball and weeks for football to view related games.
## Supported Commands
- `!cfb [team] [week]`: Retrieves college football game details for the specified team and week (current week if not specified).
- `!cbb [team] [MM/DD]`: Retrieves college basketball game details for the specified team and date (today's date if not specified).
## Installation
1. Clone this repository:
```bash
git clone https://your-repo-url/discord-scores-bot.git
cd discord-scores-bot
```
2. Install dependencies:
```bash
go mod tidy
```
3. Create a `.env` file and add your Discord bot token:
```env
BOT_TOKEN=your-discord-bot-token
```
4. Run the bot:
```bash
go run cmd/main.go
```
## Usage
- Invite the bot to your Discord server and type `!cfb [team] [week]` or `!cbb [team] [MM/DD]` to get game information.
- If a date or week is not specified, the bot defaults to today's date or the current week.
## Examples
- `!cfb Alabama`: Get details of Alabama's football games for the current week.
- `!cbb Duke 11/10`: Get details of Duke's basketball game on November 10th.
## Configuration
The bot is configured to use pre-defined API endpoints for fetching scores:
- College football: `https://ncaa.ewnix.net/football/fbs`
- College basketball: `https://ncaa.ewnix.net/scoreboard/basketball-men/d1`
Ensure that your bot has the necessary permissions to read and send messages in the channels where it's active.
## Contribution
Contributions are welcome! Feel free to open an issue or submit a pull request to improve the bot or add new features.
## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
---
Stay connected with your favorite college sports and enhance your Discord experience with **Discord Scores Bot**!