pdinsdale / BattleBot

Discord.js bot for the 1-Up World Discord server
https://discord.gg/mario
5 stars 3 forks source link

Make faction battle queries data driven #17

Closed sdace closed 5 years ago

sdace commented 5 years ago

https://github.com/Phoenix1128/BattleBot/blob/0e8036a213d047f0370e6fa6fd571998215a233a/commands/factions/results.js#L29

This really needs to be data driven. An object which maps years to months, and months to faction battle data would work.

sdace commented 5 years ago

This would also solve the problem with how 2019 is treated as a special case, as can be seen here https://github.com/Phoenix1128/BattleBot/blob/0e8036a213d047f0370e6fa6fd571998215a233a/commands/factions/results.js#L150

pdinsdale commented 5 years ago

Yes this is on my To Do list with json or enmap integration

pdinsdale commented 5 years ago

Fixed in v1.2.1!