How to make a moderation bot for a Steemit promotion room in discord

in #utopian-io6 years ago (edited)

What Will I Learn?

In the following video, you will learn:

  • How to create an app in discord
  • How to connect the bot to our discord server.

To use the following methods and properties of the discord library:

  • client.user.tag
  • message.author.bot
  • message.channel.id
  • message.content
  • message.reply()
  • channel.fethMessages()
  • messages.array ()
  • message.author.name
  • message.delete()

Requirements

To be able to follow the following tutorial you need:

  • Node.js installed.
  • Discord account.
  • Basic programming knowledge.

Difficulty

  • Intermediate

Description

In this video you will learn the process of creating a bot in discord focused on moderation. The bot is focused on the moderation of post promotion channels of steemit in discord. For this we see how to perform moderation tasks such as sending messages to users, delete messages and avoid spam from the same publication by an author.

To install node.js you can use the following command.

curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -
sudo apt-get install -y nodejs

The installation of the libraries and dependencies must be done in the folder that we will use for the code of our bot. We use the following commands.

npm install --save discord.js
npm install --save dotenv

The final code created in the video can be obtained in the following link: CODE

Remember not to share the token of your applications with anyone. The application created for this video has been deleted, so the token used in this video has no relevance.

Video Tutorial

Curriculum

This is my first video of Discord.js



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Hey @zenkly I am @utopian-io. I have just upvoted you!

Achievements

  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

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

Thank you for the contribution. It has been approved.

  • Quite interesting

You can contact us on Discord.
[utopian-moderator]

Wow..nice and amazing @zenkly

Excelente amigo buen trabajo saludos exitos

Gracias :D

Oye! felicidades por tu primer vídeo acerca de discord, espero que vengan muchos mas y siga creciendo la comunidad

Excelente aporte amigo @zenkly! Muchas gracias por compartir tu aprendizaje. Saludos.

Ahora el video en español plz jejeje

Lo grabé en español, y cuando ya lo estaba editando me di cuenta que no grabé el audio. XD

Ha que mal :(

Muy interesante, sería bueno publicarlo en espeñaol, tanto el texto como el video. Exitos.

¡Si! Pero torpemente no grabe el audio en español por error =(

Hola @zenkly ante todo felicitaciones por el excelente trabajo. Tengo un servidor en discord el cual le estoy poniendo cariño, lo estoy armando basicamente para ayudar a los steemians a mejorar sus post y que los puedan promocionar pero tengo ya algun tiempo tratando de ubicar al creador de botitas del servidor de mosqueteros y me imagino que eres tu, despues de buscar tanto. Creo que este video tienen esas funcionalidades pero como esta en ingles es como si fuera japones para mi y como habla de codigos y programacion entonces es una mezcla de mandarin, por ende te imaginaras lo perdido que estoy.. La pregunta es : Llegaste hacer este tutorial en castellano? o en algun otro lugar que pueda al menos entender y poder seguir paso a paso tus indicaciones. Gracias de antemano.

Coin Marketplace

STEEM 0.15
TRX 0.15
JST 0.028
BTC 53554.32
ETH 2224.75
USDT 1.00
SBD 2.29