Repository
https://github.com/nawab69/mcbot
New Projects
Description
mcBOT is a Discord BOT which shows statistics of any steemit post. Its full name is mr. COUNTER BOT. Currently it shows this three information.
- Total Words
- Total Characters
- Total Upvotes
When a user send any steemit post/article link to DISCORD channel or DM to mcBOT, The bot reply the statistics of total words, characters and upvotes. It will help the all the steemit community of discord. It will also help those community who arrange article writing contest.
DOCUMENTATION
Requirements
- NodeJS
- DiscordJS Module
- Request Module
- STEEMTOOLS API
- Text Editor
- Server
Installations
- Open Terminal / CMD
- Install NodeJS
apt install nodejs
- Install Git
apt install git
- Create Directory
mkdir mcbot
- Go to mcbot folder
cd mcbot
- Clone this repository
git clone https://github.com/nawab69/mcbot.git
- Change the directory to bot directory.
cd mcbot
- Install modules from package json
npm install
- Or manually install all modules.
- Install NodeJs Module
npm install nodejs --save
- Install DiscordJS Module
npm install discord.js --save
- Install Request Module
npm install request --save
- Install NodeJs Module
Customization
- Open
app.js
with any text editor. - Edit The last line of
app.js
Uncomment this line
client.login("client secret");
Write your client secret into the ""
Comment/Delete the last line.
Run the bot
Write down this code on terminal
node app.js
Now add your bot from discord developer.
Follow this guide if you want to deploy your bot from heroku server
https://medium.com/@mason.spr/hosting-a-discord-js-bot-for-free-using-heroku-564c3da2d23f
app.js (all codes are well commented)
Command
- Sent any steemit Post link to your Discord chanel or DM to mcbot.
- It will return your steemit post's
- Total Words
- Total Characters
- Total Upvotes
Use mcBOT Bot without server
- Invite mcBOT to your chanel by this link
Technology stack
I have used nodejs
and discord.js
for build this BOT. I have also used my own steemtools API to collect data. I have used request
module for get data from API. I have used heroku for deploying this bot directly from github.
Roadmap
My future plan for this bot is adding more functions. Normally its a counter bot. It displays the total words, characters & upvotes. In future, I will add some more command to display this separately. I also want to bring This bot to steemit blog. When A user post in a specific categories, the bot replied with total words and characters. This bot can help the contest creators to counting total words.
- Add More commands
- Bring it in steemit Comment BOT
How to contribute
This is an open source DISCORD Bot. Anyone can contribute in this bot by simply fork in mcbot github repository.
Contributors may get reward for their contribution.
Donation
You can Donate me for this BOT
STEEMIT : @nawab69
Ether(ERC-20) : 0xc2c8e307c5c0f33eab27a95c7c2e029234732a9a
Thank you for your contribution @nawab69 !
message.content.startsWith("https://steemit.com")
could be refactored to a function e.g.isSteemURL(url)
var
could be replaced by eitherconst
orlet
.JSON.parse
should be wrapped intry
..catch
in case of bad format dataYour 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? Chat with us on Discord.
[utopian-moderator]
Thank you for your review, @justyy! Keep up the good work!