UQComputingSociety / uqcsbot-discord

:mortar_board: UQCSbot: Our friendly little Discord bot
https://discord.uqcs.org
MIT License
20 stars 20 forks source link

Dominos.......with Dominos #209

Open jenseni-git opened 1 month ago

jenseni-git commented 1 month ago

Dominos supplies a website with coupons: here. These coupons are more up-to-date, reliable and wide ranging compared to those supplied by our discord bot.

The coupons on the website require a name and a store identifier to be opened (each store is individually owned with individual coupons). To search for a store, a request is made to an api at https://www.dominos.com.au/dynamicstoresearchapi/getlimitedstores/10/st%20lucia. Here, st%20lucia was the search time. A request to this page returns a JSON data array, ordered by likeness to the search term. In each store's data is, importantly, a store's 'Properties.offersUrl' value. This link, appended to https://www.dominos.com.au generates the coupon website for a particular store.

TLDR I would update the dominos command to: MVP: Use the dominos website to get St Lucia store coupons Extension: /dominos initially takes in a store search term (or st lucia by default). The bot returns 3 options, of which the user chooses one. The bot then returns all dominos coupons at the site as explained above. There should also be a boolean flag 'no check' that if set will just always return the first of three options, because sometimes I know what store I'm searching for.