create account

dcom: A curation bot on Discord for STEEM communities by emrebeyler

View this thread on: hive.blogpeakd.comecency.com
· @emrebeyler · (edited)
$64.99
dcom: A curation bot on Discord for STEEM communities
[dcom](https://github.com/emre/dcom) (**d**iscord **com**munity bot) is a (python3.6+)  bot for communities to trigger upvotes from specified discord channels/servers.

***

I have built a couple of discord bots for community curations in the past. <sup><a href="https://github.com/emre/deutschbot">1</a>, <a href="https://github.com/emre/dpoll.xyz/blob/master/dpoll/polls/management/commands/run_discord_bot.py">2</a></sup>

A couple of days ago, one of the communities I have been involved with asked a similar bot for their upcoming discord server. Since I am doing -almost- the same thing third time, this time I have decided to make it a generic bot package. It's usable for every kind of community for curation with community curation accounts.

It has a handful validators in place before upvoting and this will be increase in time.

#### Installation
***

```bash
$ pip install dcom
```

<img src="https://cdn.steemitimages.com/DQmQriLGQackRyYAHj6Nhoxu1g3gUXSkgwY8jtTpnD6eaMn/Screen%20Shot%202018-11-29%20at%208.23.16%20PM.png">


#### Configuration
****

You should create a configuration file stored at ```~/.dcom_env```.

Example variables:

```
BOT_ACCOUNT=<bot_username>
BOT_POSTING_KEY=<bot_posting_key>
STEEM_NODES=https://api.steemit.com
DISCORD_BOT_TOKEN=<discord_bot_token>
CHANNEL_WHITELIST=<channel_id_1>,<channel_id_2>
LATE_CURATION_WINDOW=561600
EARLY_CURATION_WINDOW=800
CURATOR_GROUPS=curators,admins
```

| Key                   | Value                                                     |
|-----------------------|-----------------------------------------------------------|
| BOT_ACCOUNT           | The account used for the curation                         |
| BOT\_POSTING\_KEY       | Private posting key of the curation account               |
| STEEM_NODES           | A list of STEEM nodes (comma separated)                   |
| DISCORD\_BOT\_TOKEN     | \<Token of the discord bot\>                                |
| CHANNEL_WHITELIST     | Curation channel id list (comma separated)                |
| LATE\_CURATION\_WINDOW  | Maximum age for a post (in seconds)                       |
| EARLY\_CURATION\_WINDOW | Minimum age for a post (in seconds)                       |
| CURATOR_GROUPS        | Discord roles authorized to use the bot (comma separated) |

<img src="https://cdn.steemitimages.com/DQmWgd4kMkV4ayus8jxeF1Tue2DumURMk7uKxuXkkQW6RW7/Screen%20Shot%202018-11-29%20at%208.24.07%20PM.png">

***

#### Running
***

```bash
$ dcom
```
***


#### Roadmap
***

- ```discord.py``` uses asyncio, while I use lightsteem to broadcast transactions. lightsteem or other steem libraries blocks the asyncio loop. It's not making a huge difference on a small scale like this,  but it would be good to have an async solution here.

- Adding more *generic* commands. These commands should be kind of commands that every community can benefit. Expanding more commands also needs some refactoring on the code to make the commands modular.

- Integration with blacklist APIs

- Implementation of an internal blacklist system.

#### Commits
***
https://github.com/emre/dcom/commits/master
πŸ‘  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 267 others
properties (23)
authoremrebeyler
permlinkdcom-a-curation-bot-on-discord-for-steem-communities
categoryutopian-io
json_metadata{"community":"steempeak","app":"steemit/0.1","format":"markdown","tags":["utopian-io","development","dcom","programming","python"],"links":["https://github.com/emre/dcom","https://github.com/emre/deutschbot","https://github.com/emre/dpoll.xyz/blob/master/dpoll/polls/management/commands/run_discord_bot.py","https://github.com/emre/dcom/commits/master"],"image":["https://cdn.steemitimages.com/DQmQriLGQackRyYAHj6Nhoxu1g3gUXSkgwY8jtTpnD6eaMn/Screen%20Shot%202018-11-29%20at%208.23.16%20PM.png","https://cdn.steemitimages.com/DQmWgd4kMkV4ayus8jxeF1Tue2DumURMk7uKxuXkkQW6RW7/Screen%20Shot%202018-11-29%20at%208.24.07%20PM.png"]}
created2018-11-29 17:52:00
last_update2018-11-29 18:01:51
depth0
children10
last_payout2018-12-06 17:52:00
cashout_time1969-12-31 23:59:59
total_payout_value49.029 HBD
curator_payout_value15.963 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length3,121
author_reputation448,535,049,068,622
root_title"dcom: A curation bot on Discord for STEEM communities"
beneficiaries
0.
accountutopian.pay
weight500
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id76,108,171
net_rshares112,413,035,192,312
author_curate_reward""
vote details (331)
@bayeco06 ·
$15.09
hey dear hz emrebeyler, i want to learn how much money i can earn with use this holy bot , thank you very much xd
πŸ‘  , , , , , , , , , , ,
properties (23)
authorbayeco06
permlinkre-emrebeyler-dcom-a-curation-bot-on-discord-for-steem-communities-20181129t214554515z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2018-11-29 21:46:09
last_update2018-11-29 21:46:09
depth1
children0
last_payout2018-12-06 21:46:09
cashout_time1969-12-31 23:59:59
total_payout_value11.351 HBD
curator_payout_value3.739 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length113
author_reputation59,171,242,711,339
root_title"dcom: A curation bot on Discord for STEEM communities"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id76,116,941
net_rshares24,862,777,904,930
author_curate_reward""
vote details (12)
@beerlover ·
<div class='pull-right'>https://cdn.steemitimages.com/DQmaHThyECGhEx8tSfHZbiMFRNYjJ35K92cDgiJjkzBUaJo/One%20sip%20of%20BEER%20for%20you.gif<p><sup><a href='https://steem-engine.com/?p=market&t=BEER'>View or trade </a> <code>BEER</code>.</sup></p></div><center><br><br> <p> Hey @emrebeyler, here is a little bit of <code>BEER</code> from @isnochys for you. Enjoy it!</p> </center>
properties (22)
authorbeerlover
permlinkre-dcom-a-curation-bot-on-discord-for-steem-communities-20191129t060739z
categoryutopian-io
json_metadata"{"app": "beem/0.21.1"}"
created2019-11-29 06:07:42
last_update2019-11-29 06:07:42
depth1
children0
last_payout2019-12-06 06:07:42
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length379
author_reputation25,840,107,447,867
root_title"dcom: A curation bot on Discord for STEEM communities"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id92,926,264
net_rshares0
@carlagonz ·
This is an excelent tool, thanks for your work for community!

Posted using [Partiko Android](https://steemit.com/@partiko-android)
properties (22)
authorcarlagonz
permlinkcarlagonz-re-emrebeyler-dcom-a-curation-bot-on-discord-for-steem-communities-20181202t221929228z
categoryutopian-io
json_metadata{"app":"partiko"}
created2018-12-02 22:19:30
last_update2018-12-02 22:19:30
depth1
children0
last_payout2018-12-09 22:19:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length131
author_reputation122,595,407,813,293
root_title"dcom: A curation bot on Discord for STEEM communities"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id76,262,757
net_rshares0
@helo ·
$9.60
- Thank you for this great service to the open source and steem communities.
- The only thing that I can think would complement this article is a link to a tutorial on how to create a discord bot. 

Your contribution has been evaluated according to [Utopian policies and guidelines](https://join.utopian.io/guidelines), as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, [click here](https://review.utopian.io/result/3/2121121).

---- 
Need help? Write a ticket on https://support.utopian.io/. 
Chat with us on [Discord](https://discord.gg/uTyJkNm). 
[[utopian-moderator]](https://join.utopian.io/)
πŸ‘  , , , , , , , , , , , , , , , , , ,
properties (23)
authorhelo
permlinkre-emrebeyler-dcom-a-curation-bot-on-discord-for-steem-communities-20181130t003741583z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"links":["https://join.utopian.io/guidelines","https://review.utopian.io/result/3/2121121","https://support.utopian.io/","https://discord.gg/uTyJkNm","https://join.utopian.io/"],"app":"steemit/0.1"}
created2018-11-30 00:37:42
last_update2018-11-30 00:37:42
depth1
children1
last_payout2018-12-07 00:37:42
cashout_time1969-12-31 23:59:59
total_payout_value7.268 HBD
curator_payout_value2.333 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length688
author_reputation121,547,934,535,311
root_title"dcom: A curation bot on Discord for STEEM communities"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id76,123,222
net_rshares15,892,229,511,805
author_curate_reward""
vote details (19)
@utopian-io ·
Thank you for your review, @helo! Keep up the good work!
properties (22)
authorutopian-io
permlinkre-re-emrebeyler-dcom-a-curation-bot-on-discord-for-steem-communities-20181130t003741583z-20181202t000651z
categoryutopian-io
json_metadata"{"app": "beem/0.20.9"}"
created2018-12-02 00:06:54
last_update2018-12-02 00:06:54
depth2
children0
last_payout2018-12-09 00:06:54
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length56
author_reputation152,955,367,999,756
root_title"dcom: A curation bot on Discord for STEEM communities"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id76,219,315
net_rshares0
@isnochys ·
Time is a river,this is one year old !BEER
properties (22)
authorisnochys
permlinkre-dcom-a-curation-bot-on-discord-for-steem-communities-20191129t060724z
categoryutopian-io
json_metadata"{"app": "beem/0.20.23"}"
created2019-11-29 06:07:27
last_update2019-11-29 06:07:27
depth1
children0
last_payout2019-12-06 06:07:27
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length42
author_reputation47,799,305,569,333
root_title"dcom: A curation bot on Discord for STEEM communities"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id92,926,257
net_rshares0
@joedukeg ·
nice! great work. I'll try it.
properties (22)
authorjoedukeg
permlinkre-emrebeyler-dcom-a-curation-bot-on-discord-for-steem-communities-20181129t213920456z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2018-11-29 21:39:27
last_update2018-11-29 21:39:27
depth1
children0
last_payout2018-12-06 21:39:27
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length30
author_reputation13,140,240,090,015
root_title"dcom: A curation bot on Discord for STEEM communities"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id76,116,751
net_rshares0
@masterthematrix ·
Great work discord bots are very popular

Posted using [Partiko Android](https://steemit.com/@partiko-android)
properties (22)
authormasterthematrix
permlinkmasterthematrix-re-emrebeyler-dcom-a-curation-bot-on-discord-for-steem-communities-20181130t124520462z
categoryutopian-io
json_metadata{"app":"partiko"}
created2018-11-30 12:45:21
last_update2018-11-30 12:45:21
depth1
children0
last_payout2018-12-07 12:45:21
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length110
author_reputation9,868,666,626,842
root_title"dcom: A curation bot on Discord for STEEM communities"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id76,146,862
net_rshares0
@steem-ua ·
#### Hi @emrebeyler!

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](https://discord.gg/KpBNYGz)**
properties (22)
authorsteem-ua
permlinkre-dcom-a-curation-bot-on-discord-for-steem-communities-20181130t005623z
categoryutopian-io
json_metadata"{"app": "beem/0.20.9"}"
created2018-11-30 00:56:24
last_update2018-11-30 00:56:24
depth1
children0
last_payout2018-12-07 00:56:24
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length289
author_reputation23,214,230,978,060
root_title"dcom: A curation bot on Discord for STEEM communities"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id76,123,869
net_rshares0
@utopian-io ·
Hey, @emrebeyler!

**Thanks for contributing on Utopian**.
We’re already looking forward to your next contribution!

**Get higher incentives and support Utopian.io!**
 Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via [SteemPlus](https://chrome.google.com/webstore/detail/steemplus/mjbkjgcplmaneajhcbegoffkedeankaj?hl=en) or [Steeditor](https://steeditor.app)).

**Want to chat? Join us on Discord https://discord.gg/h52nFrV.**

<a href='https://steemconnect.com/sign/account-witness-vote?witness=utopian-io&approve=1'>Vote for Utopian Witness!</a>
properties (22)
authorutopian-io
permlinkre-dcom-a-curation-bot-on-discord-for-steem-communities-20181130t104135z
categoryutopian-io
json_metadata"{"app": "beem/0.20.9"}"
created2018-11-30 10:41:36
last_update2018-11-30 10:41:36
depth1
children0
last_payout2018-12-07 10:41:36
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length592
author_reputation152,955,367,999,756
root_title"dcom: A curation bot on Discord for STEEM communities"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id76,142,590
net_rshares0