invidget
invidget copied to clipboard
SVG invite widgets that look just like the ones on the Discord client!
Closes #56
Also maybe create a way to disable the invite background in the url. ![image](https://user-images.githubusercontent.com/32372119/155413897-f6cd90cf-edef-40cb-bfdf-b5ebe1de7526.png)
Friend invites are now available via the API, and may be released soon in the client. Currently, invidget just times out, rather than properly displaying the friend invite. ![image](https://user-images.githubusercontent.com/91573347/175760584-8a58f0eb-d59c-48db-b66d-7d0a6d34a01c.png) ex:...
When `?format=` is present, it'll automatically convert the image to one of the two formats. If not specified, will return a SVG image. + Closes #40
It would be cool that if someone added `?format=png` to the end of the URL, the image is automatically converted to a PNG file. I might do a PR later...
After Japanese support was added in #9, I've noticed that the renderer doesn't handle special characters correctly. **Example:** `https://invidget.switchblade.xyz/discord-developers?language=ja` ![image](https://user-images.githubusercontent.com/25179120/90912197-8d254280-e3b0-11ea-8fbf-9953183cdff2.png)
Guess what? yeah, axios on this too https://github.com/SwitchbladeBot/invidget/blob/4a93050cbad1a4101f80b6ceae92911442b571d7/src/Discord.js#L8
Currently invisible portions of server icons get some strange outline around them when the normal invite widget just displays the normal background. **Invidget:** ![Invidget](http://invidget.switchblade.xyz/294919557293015060) **Discord widget:** ![Discord](https://i.moep.tv/fMdYYxal.png)
Discord displays a text acronym for invites without icons, and we shoud mimic that behavior. ### Discord ![image](https://user-images.githubusercontent.com/25179120/90912514-1b99c400-e3b1-11ea-8292-07b4c322422f.png) ### invidget ![image](https://user-images.githubusercontent.com/25179120/90912542-29e7e000-e3b1-11ea-9ea6-73cb3e9acde2.png)