Yesterday, Stephard 2.0 had successfully implemented into #teammalaysia discord group. Therefore, I will talk a bit about the updates in a technical perspective.
Checkout the previous post on the release on Stephard 1.0.
[ Utopian Link | Steemit Link ]
Bug Fixes
Thanks for @codingdefined pointed out the possible issues in the previous post.
What was the issue(s)?
- In our previous implementation of
Stephard
(version 1.0), the approach was stateless (without database), therefore there is a possibility of abusing it with deleting old messages in discord and send it again in discord channel. - User of discord are unable to track their last post, which means they need to do it manually by scrolling back to their older messages.
- In our previous implementation of
What was the solution?
- In this version 2 update, I added a Database which is MongoDB. The database will store the discord ID, steem ID, and the last post datetime.
- Since there is database implemented, user can track their last post datetime.
New Features
- What feature(s) did you add?
- Prevent abuse of post-promo channel to the next level.
- Some of the commands for registration.
*reg <steem_name>
to link discord account to steem username
*update <steem_name>
to update your steem username
*last
to check your last post datetime.
- How did you implement it/them?
- This version 2 update, I added 2 bots instead of a single one.
stephard-2
is the watcher that will approve or reject a post.stephard-2-reg
is the registration bot, to link user's discord ID to their respective, user can check their last post datetime.
- This version 2 update, I added 2 bots instead of a single one.
Details about stephard-2-reg
I implemented MongoDB into the bot.
This is how the schema looks like for User.
let userSchema = new Schema({
name: { type: String, required: true },
discordid: { type: String, required: true, unique: true },
steemname: { type: String, required: true },
lastpostdatetime: { type: Number }
});
The schema links user discord ID and steem user name. The lastpostdatetime is to keep track the time in UNIX, so that we can make sure everyone shared their link after 18 hours of the previous message.
The library (NPM Package) that I use:-
discord.js
- the official discord NPM packagemongoose
- the object modelling for MongoDB
About this Projects
Stephard version 2.0
Designed by Freepik
What is the project about?
This project is building a bot calledstephard
that will prevent discord user in our channel abuse post-promo. The on going goal is to create a upvote bot based on the post-promo channel, and upvotes post that shared by our community.Technology Stack
- Node.js
- Babel
- MongoDB
- Hosting at Digital Ocean (Ubuntu 1GB RAM)
Roadmap
- Prevent abuse of post-promo channel by implementing a bot [DONE]
- Show steem username link to discord name
- Implement Upvote Bot that automatically upvote based on link in post-promo channel
How to contribute?
This project is under MIT License with 2 Github Repository, feel free to send in issues and Pull Request.- stephard-2-reg superoo7/oo7-discord-reg
- stephard-2 superoo7/oo7-discord
What's Next?
- This bot will be implement to Qurator post-promo channel on discord within this week.
- Adding Test into the workflow. Considering using Mocha for BDD.
- After this, I will start building upvote bot in #teammlaysia channel.
Posted on Utopian.io - Rewarding Open Source Contributors
Hey @superoo7 I am @utopian-io. I have just upvoted you!
Achievements
Community-Driven Witness!
I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!
Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Rock on Stephard. You're a real treasure to #teammalaysia. Appreciate all your contribution benefiting all of us :)
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
You're welcome man. You also did a lot of great job for us too!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Your contribution has been approved.
For questions and feedback you can contact us on Discord.
[utopian-moderator]
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Thank you moderator, that was quick
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Awesome stuff bro! Even though I'm not familiar with all of the technical details, it was a insightful read. Thanks for your work on the Team malaysia discord man.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
You're welcome man. Learn a lot on the way of building bot
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Congratulations! This post has been upvoted from the communal account, @minnowsupport, by superoo7 from the Minnow Support Project. It's a witness project run by aggroed, ausbitbank, teamsteem, theprophet0, someguy123, neoxian, followbtcnews, and netuoso. The goal is to help Steemit grow by supporting Minnows. Please find us at the Peace, Abundance, and Liberty Network (PALnet) Discord Channel. It's a completely public and open space to all members of the Steemit community who voluntarily choose to be there.
If you would like to delegate to the Minnow Support Project you can do so by clicking on the following links: 50SP, 100SP, 250SP, 500SP, 1000SP, 5000SP.
Be sure to leave at least 50SP undelegated on your account.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
@superoo Way to go bro. It's about time to let Steemit know about this awesome tool :)
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Thank you @superoo7. I don't understand the technical part that you are doing, but what I know, the system is really helpful.
Thank you very much.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
You are welcome 😁
Thanks for stopping by
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Cheers
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit