I was encouraged by @adamada to write a technical overview of the community anti-abuse discord bot in hopes that it will encourage other communities to build their own tools that may prove helpful in managing their respective communities.
Why did I build the bot
I was a Curie curator before. My co-curators then were major inspirations on creating this bot as I've mostly emulated and expanded from what they have already built -- not by using their code itself but by merely experiencing the utility and efficiency of a Discord bot that they created. It widened my perspective into how helpful a Discord bot can be within a thriving community. The bot was further shaped by @adamada and his creative efforts in battling platform abuse, and by the communities that I belonged to such as @hiveph and @tagalogtrail. I hope that by giving an overview of the components of the bot, other users would be able to build upon these ideas and create a much more efficient and functional version tailored for their communities.
The next sections of this post would probably make zero sense to non-programmers (and apologies for that!), and at the same time, it isn't technical enough to sufficiently guide programmers. The succeeding content is mainly about ideas of how the bot operates and an overview of the components of the bot. But if you have done anything with Node.js, then I'm 99% sure this bot would be a walk in the park for you.
Once the bot is properly configured, you can have the bot respond to specific messages. The bot will "listen" to all conversations happening inside the Discord server, so it's up to us to set and filter which messages the bot will respond to.
For one of our bot's simple functions, I coded it to say a simple hello back to anyone who types in the text "!hello".
Saying hi is all good but it's not exactly helpful. The bot only becomes more relevant to Hive communities by using HiveSQL.
Blockchain data can be quite hard to access and interpret. But if you got any SQL background knowledge, then picking apart and gathering information from the entire Hive blockchain is fairly easy to do with the use of HiveSQL. And above all that, the creator, arcange, made it free for all Hive users.
Quoting from the HiveSQL website, "HiveSQL makes it possible to produce quick answers to complex questions." One of these complex questions was how do we check connections between seemingly unrelated user accounts. A suggestion was presented to track the token exchanges between users. HiveSQL made it easy to do that as seen from this sample screenshot.
screenshot image from Adamada's post
You got the bot working and you also have unrestricted access to Hive blockchain information. Now you could build your own information resource that will be relevant to you and your community's needs.
MongoDB is a document-oriented database. There are lots of other options to use as a database but I liked that it has MongoDB Atlas, a cloud service that provides convenient setup and deployment of your database. It's also possible to use it for free. A running theme for all the components I mentioned thus far -- free and easy to use!
@adamada specifically requested to have a reporting mechanism of user offenses which includes identity theft, plagiarism, etc. He also requested that the Discord users who reported the Hive blog post should be also be tracked. Our own database, powered by MongoDB Atlas, has enabled us to record all this information and more.
screenshot image from Adamada's post
I know the information provided in this post is far from sufficient to actually help anyone to create their Discord bot. As with most endeavors, further research and study are required. My skills and experience as a programmer are fairly limited too, thus, making it much more difficult for me to translate my knowledge into writing. But that's a good point as well. Even with my limited skill set, I was able to create a functional prototype. It goes to show that with enough effort and minimal programming know-how, this Discord bot is very doable. If anyone would need further assistance, you can comment on this post or reach out on Discord. No promises if I could be really helpful, but I'll share what I can :)