f-aa / fpl-email-bot Goto Github PK
View Code? Open in Web Editor NEWFantasy Premier League automatic weekly summary email bot
License: MIT License
Fantasy Premier League automatic weekly summary email bot
License: MIT License
Sometimes you get really long names so better to use WebName as it doesn't include all first and last names. See Bernando Silva as an example.
The standings attachment gets all out of whack when someone scores more than 99 points
Error is on line: https://github.com/f-aa/Fpl-Email-Bot/blob/master/FplBot/FplBot.cs#L316
It needs to call TextUtilities.NaturalParse() the Linq query.
Since it impacts sort order we should probably include it.
There was one GW last week where someone had both their captaincy choices not play. Obviously that was a worse captaincy choice than whatever else was picked that got 2 or something at the time. Bot should probably account for this.
On the other hand it should also account for negative scores being worse than picking two captains that both didn't play. A score of -2 is worse than 0 from non-play.
Haven't tested this but pretty sure that if two teams are tied for first place, it'll show one as the leader and one as the second place 0 points behind. If we switch to using Rank and Rank Sort like the plan is for standings table, then we don't have to do a bunch of figuring out ourselves and we can make movers and shakers know about shared first like the weekly winner does.
I guess not everyone wants to use the Dan Davies rule so there should be a way to turn it off. Pretty simple to add.
If two managers have the same total points amount they don't get assigned the same position. Example, if Team A and Team B have 200 points in 2nd place, one team will be 2nd and one will be 3rd. Need to both be 2nd place and the team behind them should be 4th.
After switching the current directory code to work in Azure, it seems to have broken running locally. Always looks for gameweek.txt in C:\ regardless of where it's running from. Not sure if this is an issue specifically with this machine.
Suggested fix would be to use the current method if useAzure is set to true, but alternate method (using System.Assembly most likely) when useAzure is false.
Add a check for useAzure here:
https://github.com/f-aa/Fpl-Email-Bot/blob/master/FplBot/FplBot.cs#L90
.OrderByDescending(t => t.Value.Current.DefaultIfEmpty(null).SingleOrDefault(e => e.Event == this.currentEventId - 1)?.TotalPoints ?? 0)
.ThenByDescending(t => t.Value.Current.Sum(e => e.EventTransfers).Value);
this.currentWeekStandings = this.fplTeams
.OrderByDescending(t => t.Value.Current.Find(e => e.Event == this.currentEventId).TotalPoints)
.ThenByDescending(t => t.Value.Current.Sum(e => e.EventTransfers).Value);
Transfers should be ascending not descending.
Fpl-Email-Bot/FplBot/FplBot.cs
Line 781 in 19ee316
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.