Open Puyodead1 opened 1 year ago
as pointed out by erkin in discord, custom badges should use snowflake ids
using snowflakes for badges seems counterintuitive, as it makes server administration harder
using snowflakes for badges seems counterintuitive, as it makes server administration harder
how so?
@TheArcaneBrony If we have snowflake IDs, then the runtime badge registration flows would not need to explicitly supply an ID before creating a new badge. Such runtime-registered badges could be useful for dynamically generated badges such as boost streaks and XP points.
wait im thinking... snowflake for row ids in the list of badges? why not use (user_id, badge_id) as unique index/key instead? this would prevent eg. 2 nitro badges on a user
@TheArcaneBrony In the model I suggested, the badges that are not directly derived from flags would all be derived at runtime using generators registered to a snowflake-indexed vtable. The snowflake would be the ID of the badge generator function for that type of the badge, not the ID of the specific instance of the badge.
user profiles on Discord now have a badges array which are used instead to display badges in the client.
This could also be used for custom badges.