IFPA or PinballMap API into Discord Bot?

OK, I’ve attempted to hack something together for Discord:

The IFPA Championship Series Discord Bot:

Link to add it into your server (need to be a Server Admin):

What it does:

  • Web scrapes the standings page for the State and Year you provide it
  • Returns Top 32 people in that state
  • It’s fairly brittle because it looks for specific CSS tags to get the table it needs
  • It only works for the NACS right now.
    • With a little bit of work I can make it work for the Australian series.
    • It won’t work for WNACS because those are custom rankings pages that don’t include the State/Province name in the URL; I’ll need a reference table to return the right pages.
    • It won’t work for many of the other country championship pages since those are mostly formatted differently; I don’t see a solution for this.

How it works:

Type $ifpachamps followed by the following two inputs:

  • Two-Letter State or Province Code
  • Year

I will attempt to return the top 32 players for the year requested.
Example: $ipfachamps PA 2022`

I’m new to Discord and new to making bots, so if you have any feedback drop me a line.

3 Likes