Inspiration
We saw that COVID-19 is keeping us indoors and out of shape. In order to encourage ourselves to get out we made a competition: Fastest 5km run. This competition is taking place between us over the summer with the forfeit of wax stripes and dyed hair for the losers.
We thought we would take this opportunity to make a bot that would monitor the competition and encourage us to go outdoors.
What it does
It takes: 'distance for a submission to be valid' (eg 5 KM) and 'date competition started' as competition inputs. It also asks the users to grant permission to the bot to access the Strava data. This is done with '.code' command.
With this data it determines the user rankings and shows the updated leaderboards. This is done with the '.check' command.
How we built it
The task was broken down into 3 sections: communicating with Strava's API, processing the message received from Strava and setting up a bot to interact with users. Each section was developed separately then implemented upon completion. All team members helped out with each section to better develop the bot.
Challenges we ran into
First Hackathon for 2 members one of which only started Python 2 weeks ago. This lead to difficulties is agreement on design phase.
For Jed -Difficulties in learning how to interact with an API
For India -Difficulties in learning Python as a whole
For Dax -Difficulties in learning Discord API
Accomplishments that I'm proud of
Found out how to set up and program discord bots which were pretty functional. Learned about file security and the .env file extension which was used successfully to hide the discord bot token. Managed to use Strava API to access user data and transfer the meaningful data from that data onto a functioning leaderboard.
What we learned
We learned how to program discord bots with various commands. Additionally, we found out how to use the .env file extension for security purposes- keeping the discord bot's token hidden from people viewing the code. We also learned how to access the Strava API, originally a website was setup to access the data from this but then we ended up just going straight from the API to a file. This data was then filtered, and sorted so that it could be presented in a leaderboard.
What's next for outRun
Develop the programme to show more statistics e.g. total distance travelled & total calories burned. Make the bot more accessible to other servers. Integrate Outrun onto a website to increase overall accessibility. Implement a timer to prevent users from reaching the daily request cap for the Strava API.
Log in or sign up for Devpost to join the conversation.