A Yahoo Fantasy Sports bot for Discord
Project description
Harambot
An interactive Yahoo Fantasy sports bot for Discord.
Commands
/ping - Gives the latency of harambot
/RIP - Pay respects
/standings - Returns the current standings of the current league
/roster "Team name" - Returns the roster of the given team
/stats "Player Name" - Returns the details of the given player
/trade - Create poll for latest trade for league approval
/matchups - Returns the current weeks matchups
/waiver - Returns the waiver wire tranasactions from the previous 24 hours
/configure - Configure the bot for your guild
You can find example output of these commands here
Roll your own instance
Prerequisites
In order to properly configure your bot you will need the following:
Visit our wiki for a step by step guide on how to obtain these values.
Run the bot in the cloud
Run the bot locally using pip package
-
Install the harambot package using pip
pip install harambot
-
Export the following environment variables
export DISCORD_TOKEN='[YOUR DISCORD TOKEN]' export YAHOO_KEY='[YOUR YAHOO API CLIENT ID]' export YAHOO_SECRET='[YOUR YAHOO API CLIENT SECRET]' export DATABASE_URL='[YOUR DATABASE URL]'
-
Run the bot
harambot
Run the bot locally using docker
-
Pull the latest image from docker hub
docker pull dmcp89/harambot
-
Export the following environment variables
export DISCORD_TOKEN='[YOUR DISCORD TOKEN]' export YAHOO_KEY='[YOUR YAHOO API CLIENT ID]' export YAHOO_SECRET='[YOUR YAHOO API CLIENT SECRET]' export DATABASE_URL='[YOUR DATABASE URL]'
-
Run the bot
docker run --name harambot \ -e DISCORD_TOKEN=$DISCORD_TOKEN \ -e YAHOO_KEY=$YAHOO_KEY \ -e YAHOO_SECRET=$YAHOO_SECRET \ -e DATABASE_URL=$DATABASE_URL \ --rm dmcp89/harambot
Setup
Add the bot to your guild
- Generate a OAuth url from the discord developer portal using the bot scope and the following permissions:
- Send Messages
- Send Messages in Threads
- Embed Links
- Attach Files
- Read Message History
- Add Reactions
- Use Slash Commands
The permission value should be 277025507392
- Set the gateway intents
In order for the bot to work properly it requires the following intents:
- Sever Members Intent
- Message Content Intent
- Navigate to the generated url in a web browser and authorize the bot for your guild
Configure your guild
- Once your bot is added to your guild you can configure it by using the /configure command:
- Use the Login with Yahoo button to authenticate with Yahoo and get your Yahoo token
- Use the Configure Guild button to configure your guild for the bot
- You can reconfigure your guild by running the configure command and clicking the Configure Guild button.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
harambot-0.3.3.tar.gz
(5.9 MB
view hashes)
Built Distribution
harambot-0.3.3-py3-none-any.whl
(15.7 kB
view hashes)