Posts

Introducing Punk Badges

avatar of @themarkymark
25
@themarkymark
·
·
0 views
·
2 min read

You may have noticed the Hive Punks Connoisseur badge.

This was introduced a while ago but was never fully automated. I put aside some time tonight to do just that, and get it online. As of right now, the badge is fully automated.

If you have more than 5 Hive Punks in your possession, you will automatically get this badge within an hour or so. If you put your Punks on the market and you have left than 5 Punks in your possession, you will lose the badge within a similar timeframe.

Every hour the bot will pull all 10,000 Hive Punks and assign badges to anyone who has more than 5 Punks and do not already have the badge. It will also remove the badge from anyone who has the badge but no longer has at least 5 Hive Punks.

As of the time of this post, 222 unique users have more than 5 Hive Punks.

How to get a badge for your project

I maintain a few badge bots for a few projects, not all of them are mine. While the process is pretty straight forward, each project usually has their own requirements of what qualifies a user for a badge.

The first step to get a badge is to request it from the @peakd team. You will need to have a badge-###### already made up along with an avatar and strict criteria what qualifies you for the badge. This criteria must be in the bio of the account handling the badge. You can get in touch with them via their Discord, there is a dedicated channel for badge requests.

Once approved, you need to make a bot that has the badge account follow and unfollow people based on your criteria. You can have this bot run hourly like mine does or daily, it really isn't that critical and highly depends on the amount of work involved to analyze who should own the badge.

Many badges are one-time achievements, and do not require analyzing if a badge should be removed, this makes the process a little easier.

Once you do that, you just need to put the code up on a server and schedule it to run on a regular basis (i.e. cron).

You will need 5-20 HP on the account to handle RC demands, depending on how frequently things change. Your initial update will likely drain your RC faster than normal, then it should stabilize.

Thanks @doze!

Posted Using LeoFinance Beta