Discord has Voted post code

in utopian-io •  7 years ago  (edited)

Components

Code for a discord bot to filter dropped posts and accept them if the author has voted other posts.

Proposal

    var = json.load(open("temp.txt")) 
    
    i = 0
    voin = 0
    vote = {}
    recject=0
    voted = ''
    a =[]
    for url in var:
        i =i+1
        if i < max_p:
            p = Post(url)
            #print(p.identifier)
            for vote in p.active_votes:
                if dropper == vote['voter']:
                    voin = voin + 1
                    voted = voted + p.identifier + '\n'
                    a.append(vote['voter'])

Mockups / Examples

from there code can be implemented to selectiveliy delete unless voin is bigger than x

Benefits

Cleaner discord servers.



Posted on Utopian.io - Rewarding Open Source Contributors

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Your contribution cannot be approved because it is not as informative as other contributions. See the Utopian Rules. Contributions need to be informative and descriptive in order to help readers and developers understand them.
you should try as much as possible to make the information you are passing across understandable by simple English and not coding.

Thank you.

You can contact us on Discord.
[utopian-moderator]