alexwjacks / parallel-card-bot Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Some URLs are in the new hyphenated-words format like Antius's Forecast, others are old numerical such as Trigger-Happy Trooper. We can only auto-generate the new format with any accuracy, so we will have to leverage site-scraping data (or get Parallel to provide us with a regular data set) to have accurate links for all cards.
The data itself is somewhat of a moving target -- Parallel may choose to 'rug pull' the old URLs and replace them with new ones at any time, so the best we can do (apart from getting them to generate the JSON for us...) is to add an override URL to our JSON data for each card.
Then, we adjust our algorithm to check for a URL on the card data. If there is one present, we prefer it. If it is absent, we generate it from the name and hope for the best.
The current data for Antius's Forecast is:
"Card Name": "Antius’ Forecast",
Which will (once issue #3 is fixed) result in a URL of:
https://parallel.life/cards/antius-forecast/
The actual name should be:
"Card Name": "Antius's Forecast"
(and should resolve to https://parallel.life/cards/antiuss-forecast/ )
Demolecularize
"Card Name": "Demolecularize ",
Ashes to Ashes
"Card Name": "Ashes to Ashes ",
! credits: Lazer wrote this all himself with no help whatsoever, especially not that lazybones @JERisBRISK // Lord of Cables (yes, have it @ him every time)
The current logic hyphenates card names to convert them to parallel URLs. E.g.:
!site "Archivist's Pride"
https://parallel.life/cards/archivist’s-pride
However, the URL is incorrect and results in a 404. It should be:
https://parallel.life/cards/archivists-pride/
Another example is Soleia:
!site "soleia, disciple of gaffar"
https://parallel.life/cards/soleia,-disciple-of-gaffar
URL should actually be:
https://parallel.life/cards/soleia-disciple-of-gaffar/
Another example is GRAUL
!site "G.R.A.U.L." (note, the trailing period is incorrect, issue #5 addresses that)
https://parallel.life/cards/g.r.a.u.l.
URL should actually be:
https://parallel.life/cards/graul
Because it would be awesome.
We should give proper credit to our amazing artists wherever possible.
Examples:
!site "Antius' Forecast"
Sorry, I don't know the card Antius' Forecast
!site "Antius’ Forecast"
https://parallel.life/cards/antius’-forecast
!site "archivist's pride"
Sorry, I don't know the card archivist's pride
!site "Archivist’s Pride"
https://parallel.life/cards/archivist’s-pride
This is due to the single quote character used in the JSON.
Discord uses ' but the JSON uses ’
User example:
!random-card rare
Should return a random card that has the 'rare' trait
Requested by: Dave
Command should note that everything is still subject to change.
In case anyone is curious about the code base, we should have a command to lead them to this repo.
We may want to restrict some commands to a certain channel or set of channels by name. Other commands we may want usable everywhere (e.g., !disclaimer
). See if discord.py supports this (either by providing the channel name to us, allow us to inspect it, or possibly implementing such filters on commands themselves)
Current name is
"Card Name": "G.R.A.U.L.",
Should not have the trailing period:
"Card Name": "G.R.A.U.L",
A rather obtuse requirement of the bot has been to surround multiple words with quotes. This leads to strange scenarios like:
Where the wrong thing is returned without quotes, and the right thing is returned with quotes, the only difference being the quotes. This is due to the second word being ignored completely (only "life" is passed in).
The user really shouldn't have to use quotes. around the names when all of the arguments are part of the query, and there are no other parameters.
My spelling is horrible
Listing them all "in full" would be overwhelming, but it would be groovy to provide an index of names, grouped by their respective Parallel.
Requested by: DragonSpit
We've having 'fun' trying to get the bot to use emoji properly in the target server. Adding a command that would echo user input might help. Should role-limit this to prevent abuse.
We love the Juomi. And they are one and the same, after all.
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.