badges / shields

Concise, consistent, and legible badges in SVG and raster format
https://shields.io
Creative Commons Zero v1.0 Universal
23.75k stars 5.5k forks source link

Discord new snowflake IDs is invalid #9208

Closed harshfeudal closed 1 year ago

harshfeudal commented 1 year ago

Are you experiencing an issue with...

shields.io

🐞 Description

Discord 2023 new snowflake is invalided with current Shields API

🔗 Link to the badge

Discord

💡 Possible Solution

As a Discord library contributor, I advise changing API from v6 to v10 in this line: https://github.com/badges/shields/blob/da615eeef7f2b2d0a8bb62d920218cc5ad428f74/services/discord/discord.service.js#L60

Outdated Discord API may result in an error on defining servers with 19 digits snowflake.

chris48s commented 1 year ago

I've just tried the ID in your badge ( 1103255588051357696 ) with the v10 API https://discord.com/api/v10/guilds/1103255588051357696/widget.json and I still get the "Widget Disabled" response.

Do you have an example of a server with a 19-digit ID that has this enabled that we can test with?

If 1103255588051357696 is your discord and you're just trying to get a badge working, can you try following https://player.vimeo.com/video/364220040 as a first step.

Ta

harshfeudal commented 1 year ago

Oh cool, I forgot to enable the widget. thanks a lot!