Steem-Discord-Bot Announcement and Making it OpenSource.

in #utopian-io6 years ago (edited)

Repository : - https://github.com/genievot/Steem-Discord-Bot


SD.png

Steem D Bot



The project is created for steem community to get steem notifications of there blog on discord, The bot will provide you 5 types of notifications as direct embed messages with an instant. The bot is currently hosted on server and works amazingly. The bot is easy to handle and work with, Whenever you receive it's type of notification (listed below) then the bot will notifies you with a personal message. The bot restricted to only 1 steem account under 1 discord account but you can rename your steem name easily.


1.png

When it works



  • Whenever you receive up-votes or down-votes or if somebody up-vote and takes it's up-vote back.
  • You receive comment or reply.
  • You made post.
  • Somebody transfers you something
  • Somebody followed or unfollowed you.

The bot is created to be used with ease in mind.

Bot provides several commands :

- Get list of commands with: !help
- Get your account name and credit with: !info
- Get your key to buy credits: !generate_key
- Rename steem user name with: !rename to <new_name>
- Receive messages toggle with: !receive msg t/f
- Receive upvotes toggle with: !receive vote t/f
- Receive follower toggle with: !receive follower t/f
- Receive comment toggle with: !receive comment t/f
- Receive transfer toggle with: !receive transfer t/f

Technology Stack

  • Mongo db 3.4.x
  • Node js
  • Discord js
  • Steem js

Expected Roadmap:

If i got enough time for this project again then i would love to implement features in it like:

  • @genievot followers will get 100 credit every month :)
  • Credit transfer from one to another account
  • Resteem notifications
  • Showing comment and replies bodies inside the post so you don't have to go anywhere to read them.

How to contribute?

Feel free to chat me with your ideas, suggestions, or code over bot's official channel :- https://discord.gg/J5wzUC


1.png



How to use:



How to register with bot:

  • First go here on official join server for this bot:- https://discord.gg/U587d4x
  • Now you will get message inside the #join channel that you send a Direct message with you steem name. Then send it by clicking the bot name and something like this:

    2018-09-09 (6).png
  • After that the bot will reply you if you allow to chat with server members in your privacy setting of that server. Which is mostly turned on until you turned off by yourself. If you want to turn it on with this Guide:

    2018-09-09 (10).png
  • Now, You are good to go. You will now receive notifications for above listed activity occur under your steem name. Send !help command to get list of commands that you can use with this bot.

    2018-09-09 (12).png

Note: The bot uses Credit system to support it's further development and for server cost, For each post you receive from bot about your steem activity(not include recharge credit notification and commands) consumes 1 credit. You get 500 Credit at start so you can receive 500 posts from steemit by this bot. Then you can recharge your credit, For each steem you send you will get = steem sent x 100 credit, e.g 1 steem = 100 credit. But before sending steem (if you want to recharge your credit) then make sure you have created your key by !generate_key command and then copy and paste the key in the memo without putting any extra character inside memo and send it to @genievot and You will get notification of your credit recharged. Remember that whatever you send to @genievot is not refundable and will support this project.

  • You can now choose for what you want to notify about with above commands and this will also saves your credit. By default everything is true, So after setting the server you will immediately start receiving notifications.


How to earn credit:

I have added code that if you upvote @genievot Posts or comments where @genievot is the author then you will get Voting power / 10 = credit to your account. It's fun system so i've added it inside the bot. If you upvote with 100% voting power then you get 10 credit on all of your same steem name accounts and removing vote will decrease the 10 credit :p .
Well you can find tens of loo poll inside it not to loose credit while removing voting power but remove voting power after voting is bad idea because it consumes your voting strength as well ( i am not sure but i saw it sometimes happened) and also it will remove your curation reward over the current post.


2018-09-09 (15).png



How to recharge credit:

  • Send !generate_key command to the bot.

    2018-09-09 (17).png

The key doesn't needed to be private by the way :p it's just an identifier for the database of particular discord user.

  • Now copy the key and go to steemit transfer steem page and add the key as memo (Remember that never add any character not even space inside the memo with key)
  • Send it to genievot. Remember it's vot and not bot in genievot.

    2018-09-09 (20).png
  • And you will get you message for your credit. Then with command !info you can check your credit and other details.

The credit you buy by sending steem will support this project and pay it's server fee.


1.png



How to Deploy it locally on your PC:



If you are a tech nerd and know how this stuff work then you can deploy it locally or on your server easily.

  • You should have mongo db running.
  • Go here are check out all the environment details and installing details Here.

There is an official help channel in bot's server, Where you can ask questions about it.

GitHub Account

https://github.com/genievot

Sort:  
  • Seems like you store channel ids hardcoded. It would better to keep this kind of things configurable, so other bot operators can install and use it with ease.

  • You have an assumption in here if(ifollow[1].what[0] != null) { that if what[0] is not null, it would be a follow. However, when you mute/ignore someone, you will get "ignore" here and the bot will send a notification like it was a follow.

  • Seems like you have done everything in a single index.js file. To keep the debugging and maintenance simpler, modulizing functionality, seperating the discord bot stuff with the transaction parsing logic may help.

  • Why are the /node_modules stored in the GIT repository? I believe there is no need to vendorize dependencies for that project.

  • I had to score low on commit message question in the questionnaire because of the broad commit messages like #1, #2. Here is a simple guide about efficient commit messages.

It's a good start and I am totally hooked up with the idea of having a personal notification bot - instead of gina.

Looking forward to see more updates on that matter. :)

Your contribution has been evaluated according to Utopian policies and 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.


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

Thank you for reviewing this post . Here are some points i made on your points :)

  • I will keep this in my mind . thanks for this suggestion .
  • I didn't notice that, it was a mistake if i get some time for this project i will absolutely solve it.
  • Yeah sure thanks, I will keep this in my mind too.
  • I read your article and it's a good thing toward open source community and makes easy for contributors, thanks, i will take this initial step for this .

Thank you for your review, @emrebeyler!

So far this week you've reviewed 8 contributions. Keep up the good work!

Hi @genievot!

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

Hey, @genievot!

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 or Steeditor).

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

Vote for Utopian Witness!

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

Award for the total payout received

Click on the badge to view your Board of Honor.
If you no longer want to receive notifications, reply to this comment with the word STOP

Do not miss the last post from @steemitboard:

SteemitBoard - Witness Update
SteemFest³ - SteemitBoard support the Travel Reimbursement Fund.

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

The bot is open source so you can customize it if you are hosting it and give your self a huge amount of credit :)

Coin Marketplace

STEEM 0.26
TRX 0.11
JST 0.033
BTC 64006.33
ETH 3077.08
USDT 1.00
SBD 3.87