Unofficial Global Blacklist API Checker Discord Bot

image.png

Repository

https://github.com/anthonyadavisii/blacklist_check

New Projects

This code will allow you to run a Discord bot that is able to query the Steem Global Blacklist API created by witness @themarkymark. This is useful so users will know the blacklists that the abuser is yet to be added thus preventing duplication of efforts in reporting.

The relevant function is as follows:

@bot.command()
async def blacklist_check(user):
    """Queries blacklist status of user using @themarkymark's Blacklist API."""
    contents = urllib.request.urlopen("http://blacklist.usesteem.com/user/"+user).read()
    bl = (str(contents).split('"blacklisted":[')[1]).split(']')[0]
    if bl == '':
        await bot.say('@'+user+' is not on any blacklist tracked via the API')
        return
    else:
        blacklists = []
        bl = bl.split(',')
        for b in bl:
            blacklists.append(b.replace('"',''))
        await bot.say('@'+user+' is on the following blacklists: ')
        for b in blacklists:
            await bot.say(b)

More general information about the API:
https://steemit.com/utopian-io/@themarkymark/global-blacklist-api-2-0-released

  • Technology Stack

The following version of Discord.py created by Rapptz, API wrapper for Discord, was used and verified as functional for this project:

https://github.com/Rapptz/discord.py@rewrite#egg=discord.py[voice]

  • Roadmap

Was considering adding the AccountDoesNotExist exception from Beem but I am not sure if the benefit is worth having an additional dependency. Unless there is a compelling reason to do otherwise, think we will keep this as it as.

  • How to contribute?

I am on Discord (@anthonyadavisi#5095) and steem.chat (same as my Steem user) and am happy to add any improvements or you can simply add a pull request to the Github repo.

Example of command being used:

image.png

GitHub Account

https://github.com/anthonyadavisii

Sort:  
Loading...

Hi @anthonyadavisii!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server

Hi, @anthonyadavisii!

You just got a 7.08% upvote from SteemPlus!
To get higher upvotes, earn more SteemPlus Points (SPP). On your Steemit wallet, check your SPP balance and click on "How to earn SPP?" to find out all the ways to earn.
If you're not using SteemPlus yet, please check our last posts in here to see the many ways in which SteemPlus can improve your Steem experience on Steemit and Busy.

YOU JUST GOT UPVOTED

Congratulations,
you just received a 11.02% upvote from @steemhq - Community Bot!

Wanna join and receive free upvotes yourself?
Vote for steemhq.witness on Steemit or directly on SteemConnect and join the Community Witness.

This service was brought to you by SteemHQ.com

Congratulations @anthonyadavisii! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You got more than 2000 replies. Your next target is to reach 2250 replies.

Click here to view your Board
If you no longer want to receive notifications, reply to this comment with the word STOP

Do not miss the last post from @steemitboard:

Christmas Challenge - The party continues
Christmas Challenge - Send a gift to to your friends

Support SteemitBoard's project! Vote for its witness and get one more award!

Coin Marketplace

STEEM 0.16
TRX 0.15
JST 0.029
BTC 55157.38
ETH 2317.75
USDT 1.00
SBD 2.33