langel / botb_irc_bot

battle of the bits instant relay chat magic
BSD 3-Clause "New" or "Revised" License
11 stars 7 forks source link

shorten battle URL output #88

Closed argarak closed 2 years ago

argarak commented 2 years ago

the output of !battle and !xhb is too verbose! uses regex to shorten each battle URL by cutting out the unnecessary battle name and current sub-page

langel commented 2 years ago

so this just removes the protocol?

argarak commented 2 years ago

it uses regex to match until it finds a digit next to a forward slash, e.g. https://battleofthebits.org/arena/Battle/6963/Entries/VRC+VII+%E2%80%A2+Lost+In+Space becomes https://battleofthebits.org/arena/Battle/6963/ doesn't always result in the exact same page, but still links to either the results or entries depending on whether the battle is complete or not