DBTeamV2 Tutorial English

DBTeamV2 Tutorial English

Ignɑcio


DBTeamV2 is a powerful administration open source bot that uses Telegram-Cli instead of the common Telegram Bot Api. This means that it has awesome features that can't be found on usual Telegram bots.


It is written in Lua and made by @Josepdal @iicc1 and @Jarriztg


Index

  • Permission structure
  • Plugins explanation
  • Languages
  • Commands and usages
  • Custom whitelist/blacklist



Permissions structure

DBTeamV2 has the following structured permissions related to the bot and chats:

  1. Sudo users: they have full control of the bot and chats. They have permissions to do everything related with the bot. Usually the sudo users are the ones that have access to the server that host the bot. Sudo users must be entered manually, writing their Telegram id in ./data/config.lua on your server. To get the id's, forward a message to @userinfobot in Telegram.
  2. Admins: can do almost everything on all chats where the bot is but they can't do things that modify the proper bot bot. They should be people you trust the most.
  3. Mod(moderators): they manage most options in the chats, but a mod has no privileges out of a chat where he is mod.
  4. Users: here goes the normal user having no control of anything.


Plugins explanation

As you can see in the official repository, or in your own clone, DBTeamV2 has ten main plugins: commands, id, moderation, plugins, promote, settings, stats, gbans, extra an. d langs.They are all activated by default.


  1. commands: this plugin is just for sending a help command (this wiki).
  2. id: a simple plugin to get the id from the chat and the user. It is useful for testing purposes.
  3. moderation: as its name implies, this plugin is the core of the moderation chat system. It allows you to kick, ban, mute, delete history, global ban, etc.
  4. plugins: it allows you to activate/deactivate bot plugins.
  5. promote: this important plugin manages the permission structure of the bot. It also has other functions without specific place.
  6. settings: this controls everything that occurs on chats. Settings are configured separately in every chat. It allows you to block gifs, photos, stikers, telegram services, games, audios locations, emojis, etc, and removes and wars custom spam patterns, avoid flooding and many other awesome features.
  7. stats: it records the number of messages on every chat by all users and classifies them on a list.
  8. gbans: plugin that allows to import/export lists of globally banned users in a simple way. It can load and send gban lists in .lua or json format. It also can be used to clean gbans database.
  9. extra: this plugin creates additional commands for the bot in the chat. It can be used to send text, files, photos, audios. The commands can be configured easily in the chat.
  10. langs: simple plugin to install languages on the bot. It automatically checks if the language exists and places it in config.lua


Languages

DBTeamV2 is currently translated in four languages: English, Spanish, Persian and Portuguese. By default, only English is installed. To install more languages, write in a chat or by private in the bot:

#enable <language file>

The language will be inserted in the config.

#install <language file>

The bot will load all strings of the already enabled language.


For example, to install Spanish, you should write: #enable spanish_lang and next #install spanish_lang

Please note that sudo privileges are required for this action.

When we have our package installed, to change the language on a chat, we need to write:

#lang <language>

Substitute <language> by: es, en, pt or fa.


We are looking for translators! Feel free to submit a pull request with your new language or update outdated lang packages.


Commands and usages

This is probably the most important part of this tutorial: how to use all DBTeamV2 bot commands and features.

Note that all commands must start with "/", "#" or either with "!". Following, all commands appear with "#" but remember that there is no difference between them.


  • General commands:

#id : returns information about the chat and user identifier. If you reply a message the user id will be the user who wrote the message that you are replying. All users can use this command.


#add : this adds the chat to moderation. This means that only if the chat is added, the moderation and settings commands will work. Otherwise, only general commands are activated. All chats are not added to moderation by default.


#rem : this command does the opposite than the previous command. Only general commands will work.


#stats : returns a list of the top commentators of the chat and how many messages they have written since the bot was added to the chat. The list will show only the twenty first users. All users can use the stats.


#setabout <text> : with this command you will be able to put a custom text on the bot's profile. It will only be shown in the previsualization of the direct link of the bot-user and in some custom Telegram clients. Sudo permissions required.


#leave : the bot will leave the current chat. If it does not work, look if the bot id is correctly written in ./data/config.lua. Sudo required.


#plugins : it shows the enabled plugins of the bot. All plugins commands needs sudo permissions.


#plugins enable <plugin name>: enables the specified plugin.


#plugins disable <plugin name>: disables the specified plugin.


#plugins reload : as its name indicate, it reloads the plugins to make the changes effective so you don't need to restart the bot.


#users, #members or #tagall <text or nothing> : these three commands have exactly the same function, they tag all users of the chat to communicate something. If a text is placed after a space, the text will be shown at the end of all the tagged users. This works for moderators or higher. Example: #tagall I have good news!

In some cases you will need to put the command two times to tag all users, also this command cannot tag more than 200 users.


#extra : it shows a list of the extra commands created in the current chat.


#extra #somecommand some text : this action creates an additional extra command called #somecommand that sends the text some text. You can create all extra commands as you want. The field after the name of the command is required. Now if anybody writes in the chat #command, the bot will display some text.


#extra #somecommand optional text (replying to a file) : this will create a command that sends the file you are replying. Now the text next to the command is optional and it will be send as a caption of the file. Most of the files are supported: sticker, gif, document, photo, video, audio and voice. Sticker files are the only files that does not allow captions (text below the file). The optional field cannot contain the character "$".


#extra #commandtodelete : this command deletes the command #commandtodelete and all the files or text asociated to it. Remember that you can list all extra commands in the chat with #extra.


  • Moderation commands:

#ban <reply, user or id> : bans the user from the current chat and he wont be able to return unless he gets unbanned. This command can be used replying to the user you want to ban using just the command, or after a space, the username or user id. Mod or higher permissions required.

Example: #ban @DBTeam | #ban 12345678


#ban <time in seconds> : the user will be banned a certain time in secconds. The user you want to "tempban" must be replied with this command.


#unban <reply, user or id> : removes the user from the chat ban list so he will be able to return. The same usage as #ban. Mod or higher privileges needed.


#gban <reply, user or id> : it globally bans the user from all chats where the bot is. The usage is the same as #ban command. Admin or higher permissions required.


#gbans : displays a list of all globally banned users by the bot. If the list is too long, it wont be shown.


#gbans lua : sends a file to the chat will all the globally banned users in lua format. This is intended to be used to install this global bans in to a difFerent bot that uses lua.


#gbans json : sends a file to the chat will all the globally banned users in JSON.


#gbans install : the bot will scan the folder data/ for files called "gbans.lua" or "gbans.json" and they will be installed in the bot.


#gbans delete : it clears the global bans database.


#ungban <reply, user or id> : removes the global ban that was set to this user. Admin or higher required. Admin or higher permissions required.


#kick <reply, user or id> : kicks the user from the current chat. The difference among kick and ban is that the user does not need to be unbanned to return. Mod or higher needed.


#mute <reply, user or id> : the bot will remove instantly all messages the user sends to a specific chat. Mod or higher.


#delall <reply or nothing> : if the command replies to an user message, all his chat history will be deleted, otherwise, all chat history from all users will be removed. Mod privileges needed.


#del <reply and number> : the chat history of the replied user will be removed the number of messages you set in the command. Mod required.


#admin <reply, user or id> : promotes the specified user to admin. Only sudos can perform this action. If the user was already a moderator, he will also be removed from the moderators list.


#mod <reply, user or id> : gives moderator privileges to that user. Remember that moderators can only rule in the current chat. If the user was already an admin, it will be removed from admin list.


#user <reply, user or id> : removes mod and admin privileges to the specified user.


#admins : lists the admin of the bot.


#mods : shows the moderators of the bot in that current chat.


#bots : lists all the Api bots present in that chat. Mod required.


#kicked : shows a list of all the blocked users on the chat and who kicked them. Mod needed.


#banall : bans all users of the current chat except sudo users and the bot. If the chat has so many users, you probably will need to put the command several times. Only sudos can perform this action.


  • Settings commands:

#settings : a message with all the custom settings of the chat will be shown. Most settings related commands can be managed by mod users or higher. To modify the values of settings, use the following commands:


#tgservices <on/off> : turns on/off the telegram message services of the chat. These are for example the union messages when a new user enters the chat.


#invite <on/off> : when it is set to off, the bot will kick any user that enters to the chat.


#bots <on/off> : this command will kick any bot added to the group when it is set to off.


#lang <language> : it allows you to select a language for that chat. This was explained in detail a few paragraphs above. Sudo users can only change this.


#photos <on/off> : removes all photos sent to the chat except those sent by privileged users.


#videos <on/off> : removes all videos sent to the chat except those sent by privileged users.


#stickers <on/off> : removes all stickers sent to the chat except those sent by privileged users.


#gifs <on/off> : removes all gifs sent to the chat except the those by privileged users.


#voice <on/off> : removes all voice messages sent to the chat except those sent by privileged users.


#audios <on/off> : removes all audio messages (different from voice messages) sent to the chat except those sent by privileged users.


#documents <on/off> : removes all files and documents sent to the chat except those sent by privileged users.


#location <on/off> : removes all location messages sent to the chat except those sent by privileged users.


#games <on/off> : removes all telegram games sent to the chat except those sent by privileged users.


#forward <on/off> : removes all the forwarded message sent to the chat except those sent by privileged users.


#spam <on/off> : when it is on the off state, blocks all messages that matches the patterns you have in your custom blacklist (default list if it is not specified). More information about this spam lists can be found below.


#setspam <blacklist> : selects a specified spam list, with its corresponding blacklist and withelist located in ./data/spam_data.lua.


#reports <on/off> : when it is set on, the bot will send spam report messages to all sudo users by private when somebody spams in any chat (sometimes this may not work due to a tg-cli problem).


#flood <on/off> : activates or deactivates a flood checking in the chat. Use the following commands to configure it.


#max <number> : sets the max number of messages in a certain period of time to be considered flood.


#time <number> : sets the time period bettween checking the number of messages sent to the chat to be considered flood.


#arabic <on/off> : it removes all messages that contains Arabic letters sent to the chat and kicks the user.


#english <on/off> : the same that the previous command but with english/spanish/italian...


#emojis <on/off> : deletes all messages that contains emojis.


#welcome <on/off> : activates a welcome message when an user enters to the chat. If a custom welcome is not set, the bot will use the default welcome.


#setwelcome <text> : sets a welcome message for the chat. In that message you can use the variable $users that will be the name of the users that enters the chat.

For example: #setwelcome hi $users -> "hi DBTeam"


#rules : displays the rules of the chat, if no rules are specified, the default rules will be shown. Everybody can use this command.


#setrules <text> : sets a custom rules for the chat.


#remrules : removes the custom rules and sets to the default ones.


#norules : removes the custom and default rules of the chat.


#link : gives you the current union link of the chat. Everybody can use this command.


#setlink <link> : sets a custom link for the chat. This is useful to set the link manually, then the bot is not the creator of the chat so it cannot obtain the union link.


#newlink : generates a new union link for the chat. The bot must be the creator of the chat.


.

.

.

.

.








Report Page