Skip to content

BuiltIn Modules

prototype74 edited this page Mar 3, 2022 · 9 revisions

Modules (or also called plugins) are the core features of all userbots and offer commands or other kind of features which let the user to use them in Telegram chats. The main idea of modules is to keep stuff easy and offer features, Telegram does not offer to it's users by default. HyperUBot comes with some built-in modules. This page explains the usage of each module and their commands.

Table of contents

Administration

A module to help you to manage your or a friend's group easier. Includes common commands such as ban, unban, promote, etc.

Note: most commands in this module require obviously admin privileges to work properly

Commands

.adminlist [optional: link/id]:
Lists all admins from a channel or group (remotely).

Examples:
.adminlist (current chat)
.adminlist -100123456789 (remote)

Requires admin privileges in channels


.ban [optional: username/id chat (id or link)] or reply:
Bans a person from a chat (remotely).

Examples:
.ban @testperson
.ban @testperson -100123456789 (remote)

Requires admin privileges with ban permission


.delaccs [optional: chat id or link]:
Tries to remove deleted accounts automatically in a chat. It reports the amount of deleted accounts in the specific chat if certain permissions are not present.

Examples:
.delaccs (current chat)
.delaccs -100123456789 (remote)

Optionally: admin privileges with ban permission


.demote [optional: username/id] or reply:
Demote a person to a mortal user. Also works with admins only which are promoted by you.

Examples:
.demote @testperson

Requires admin privileges with add admin permission


.kick [optional: username/id chat (id or link)] or reply:
Kick a certain person from a chat (remotely).

Examples:
.kick @testperson
.kick @testperson -100123456789 (remote)

Requires admin privileges with ban permission


.mute [optional: username/id chat (id or link)] or reply:
Mute a certain person from a chat (remotely).

Examples:
.mute @testperson
.mute @testperson -100123456789 (remote)

Requires admin privileges with ban permission


.promote [optional: username/id and/or title] or reply:
Promote a person with immortal power! Title length must be <= 16 characters.

Example:
.promote @testperson

Requires admin privileges with at least add admin permission and a second admin permission as promote never promotes an user with add admin permission


.unban [optional: username/id chat (id or link)] or reply:
Unbans a person from a chat (remotely).

Examples:
.unban @testperson
.unban @testperson -100123456789 (remote)

Requires admin privileges with ban permission


.unmute [optional: username/id chat (id or link)] or reply:
Unmute a certain person from a chat (remotely).

Examples:
.unmute @testperson
.unmute @testperson -100123456789 (remote)

Requires admin privileges with ban permission

Chat Info

Get most various information from a channel, group or supergroup such as creation date, message counts, deletions, former name, etc.

Commands

.chatid:
Gets the ID of a channel or group in the current chat.


.chatinfo [optional: chat_id/link] or reply (if channel):
Gets info about a chat.

Examples:
.chatinfo @testlink
.chatinfo -100123456789

Note: Some info might be limited due to missing permissions


.getlink [optional: chat_id/link] (before .link):
Fetch the invite link from a channel or group to share it with other people.

Examples:
.getlink @testlink
.getlink -100123456789

Requires admin privileges with invite users permission

Deletions

This module allows you to delete your or in groups messages faster. Someone spammed your group? Use purge command to delete them all!

Notes:

  • All commands from this module require admin privileges to delete other people's messages
  • This module is not intended to delete someone's else whole group history!

Commands

.del:
Deletes the replied message.


.purge:
Purges all messages between the latest and replied message. Please don't abuse this feature to delete whole group histories from other people!

Admin privileges with delete permission are required if purge is being used in channels or groups

Feature Manager

The Feature Manager module allows the user to enable/disable a command/feature in real time and no, the .enable and .disable commands cannot be disabled.

Commands

.disable name of command/alias or feature (since v5.0.0):
Disable the given command or feature. Works with aliases too.

Examples:
.disable ban
.disable status


.disabled (since v6.0.0):
Lists all disabled features


.enable name of command/alias or feature (since v5.0.0):
Enable the given command or feature. Works with aliases too.

Examples:
.enable ban
.enable status

GitHub

A module that takes use of the GitHub API. This module allows you to check for releases from a specific user and repository.

Commands

.gitrate (alias .gitlimit) (since v7.1.0):
Get the user's current rate limit from GitHub API such as REST API or Search API.


.git user/repo:
Checks for releases on the specified user/repo combination

Example:
.git prototype74/HyperUBot

Member Info

Provides information from a specific group participant like permissions, restriction date, join date, etc.

Commands

.minfo (alias .member) [optional: tag/id group] or reply:
Get (remotely) info of a member from a supergroup.

Examples:
.minfo @testperson
.minfo @testperson -100123456789
.member @testperson

Requires admin privileges to access other member's permissions.

Messages

This module includes commands that work only with messages, such as .msgs or .pin.

Commands

.msgs [optional: username/id group] or reply:
Gets the amount of sent messages from an user (includes any message like text messages, voice notes, videos etc.). Works remotely too.

Examples:
.msgs @testperson
.msgs @testperson -100123456789


.pin [optional argument loud to notify all members] or reply:
Reply to someone's message to pin it in the chat.

Example:
.pin loud


.topusers [optional: link/chat id] (removed after v3.0.0):
Lists the top 10 members with the most messages sent in a specific chat

Examples:
.topusers @testlink
.topusers -100123456789


.unpin [optional argument all] or reply:
Reply to someone's message to unpin it or send .unpin all to unpin all messages in a chat.

Example:
.unpin all

Miscellaneous

The miscelaneous module contains a small set of tools that did not quite fit any of the other modules, but at the same time were too simple to have their own module.

Commands

.coinflip:
Flips a coin and returns heads or tails, depending on the result.


.dice:
This will send the dice emoji, Telegram will take care of the value, totally random.


.rand lower limit upper limit:
Given an upper and lower limit (both integers), the bot will generate a random number in between.

Examples:
.rand 5 100
.rand 30 2500

Modules Utils

This module manages to access the description, usage and information about modules and their commands

Commands

.lcmds (alias .help) [optional: name of command/feature] (since v4.0.0):
lists all available commands and features from all modules to use. Pass the name of a command/feature to get the usage of the specific command/feature.

Examples:
.lcmds (list all commands/features)
.lcmds status (shows the usage of specific command/feature)
.help status


.mods (alias .mod) -option number of module from the list:
lists all built-in and user modules at one place. This command takes arguments to get further information of a module such as the description or usage.

Options:

  • -d: Shows the description of the specific module
  • -i: Shows information about the specific module like the name, author, version etc.
  • -u: Shows the usage of the specific module

Examples:
.mods (list all modules)
.mods -d 1 (shows the description module no.1 from the list)
.mods -i 1 (shows the information module no.1 from the list)
.mods -u 1 (shows the usage module no.1 from the list)

Note: to get the number of a module from the list, run .mods without arguments once

Package Manager

Package manager module allows the user to install new modules. Modules from module-universe can be downloaded with the help of this module to allow the user to get new modules without waiting for new updates for the bot. There are also modules made by the community. So make sure to check them out too!

Commands

.pkg update [optional: list of owner/repo combos]:
Updates data of all repositories. If repo urls are given e.g .pkg update nunopenim/module-universe then only the specific repo(s) will be updated. This command can also be used to add new repos by using the owner/repo combo.

Examples:
.pkg update (update all data)
.pkg update nunopenim/module-universe (update only specific repo data)


.pkg list [optional: -installed or -repos]:
Lists all installed modules and all modules from known repositories. Use the -installed option to show installed modules only or the -repos option to show modules from repositories only.

Examples:
.pkg list (list all modules)
.pkg list -installed (list all installed modules)
.pkg list -repos (list all repos)


.pkg install list of modules
or
.pkg install -repo owner/repo list of modules:
Installs the list of modules from given argument. If you want to install modules from a specific repo only, use the -repo option and pass the owner/repo combo along with the list of modules as argument.

Examples:
.pkg install module1
.pkg install module1 module2 module3 (install multiple modules)
.pkg install -repo nunopenim/module-universe module1 (install module1 from module-universe only)


.pkg uninstall/remove list of modules:
Uninstalls modules from given list.

Examples:
.pkg uninstall module1
.pkg uninstall module1 module2 (uninstall multiple modules)
.pkg remove module1


.pkg rmrepo list of owner/repo combos (since v6.0.0):
Removes repos from given list of owner/repo combos from data.

Examples:
.pkg rmrepo owner/repo
.pkg rmrepo owner1/repo1 owner2/repo2

Scrappers

Not exactly what it sounds like, but still this module includes useful features like translation or text-to-speech.

Commands

.currency amount From ISO [optional: To ISO]:
Converts input currency to target currency (default: USD).

Examples:
.currency 5 eur
.currency 5 eur jpy

Requires Country ISO (EUR, USD, JPY etc.)


.scrlang (since v1.2.0):
Shows which is the current language that bot will translate or TTS to.


.setlang ISO value (since v1.2.0):
Sets a new language from the ISO value list.

Examples:
.setlang en
.setlang de


.stt:
Converts a replied voice message into text (speech-to-text).


.trt [optional: text] or reply:
Translates given text or replied message to the bot's target language.

Example:
.trt Hello!


.tts [optional: text] or reply:
Converts text or replied message into spoken voice output (text-to-speech).

Example:
.tts Hello!

Sideloader

The sideloader module allows you to sideload Python files with ease. To do such, all you have to do is reply to a .py file sent in the chat as a document!

Commands

.sideload (alias .install) force:
Sideloads a Python script file sent as a document to the chat. Reply to such. You can use the force argument to force installation, if a user space module with the same name already exists

Example:
.sideload force

Information:

  • Since v5.0.0, sideload is disabled by default. Add ALLOW_SIDELOAD = True (config.ini: ALLOW_SIDELOAD = yes) to your config file to enable it
  • These files must be written in Python to work with the bot. Attempting to load unknown files might result in a soft brick of the bot, requiring you to manually delete the bad user space module!
  • WARNING: Some malicious files could send some of your information (namely API KEY and/or String Session) to a malicious hacker! Only sideload modules if you trust the source!

System Tools

This module contains a set of system tools for the bot. It allows you to check the bot uptime, the server uptime, the versions of all the bot's components, the specifications of the server system, and some bot power controls.

Commands

.reboot:
Reboots the bot!

Note: not supported on Windows


.sendlog (since v2.3.0):
Uploads the log file to the current chat.


.shutdown:
Shutdown the bot.


.status:
Get the current status of HyperUBot such as the version, uptime etc. Useful to check if the bot is actually online.


.storage (since v2.1.0):
Shows info on bot server HDD storage.


.neofetch (alias .sysd):
Show all relevant system information (hardware and software) from host. Requires Neofetch package to be installed.

Requires neofetch package to be installed

Terminal

This module provides tools to run directly shell commands, in the host machine.

Running shell commands in the bot can and will make permanent changes to the host system. Bad things will happen if you run the bot as sudo/root!

Commands

.shell (alias .termial) command:
Executes in the server machine shell prompt (bash, powershell or zsh) the specified command.

Example:
.shell ls -l

Warning: if the userbot process is running as root, this could potentially break your system irreversibly! Proceed with caution!

Updater

The updater module allows the user to update the userbot to the latest release if available.

Commands

.update upgrade:
Checks for updates, and if available, displays the latest version and instructions.

Example:
.update
.update upgrade

Note: updating HyperUBot using .update isn't recommended if the directory is a local git repository as it could break the git history

User

Provides information about any user, your statistics, and contains the kickme tool.

Commands

.id (alias .userid) [optional: username] or reply:
Get the ID from a channel or an user. If replied to a forwarded message, it gets the IDs from both, forwarder and original author.

Examples:
.id @testperson
.id 123456789


.info [optional: username/id] or reply:
Gets information about an user.

Examples:
.info @testperson
.info 123456789


.kickme (alias .leave):
Makes you to leave the group.


.stats:
Gets your Telegram statistics.

Web Tools

This module contains most, if not all, of the userbot's webtools, such as ping, speedtest, RTT calculator and the current datacenter.

Commands

.dc:
Finds the near datacenter to your userbot host.


.ping DNS/IP:
Pings a specific DNS or IP address.

Examples:
.ping 8.8.8.8
.ping localhost
.ping 1.1.1.1
.ping 192.168.0.1


.rtt:
Gets the current Round Trip Time


.speedtest [optional argument pic]:
Performs a speedtest and shows the result as text. Passing pic as argument will change the result to a picture.

Examples:
.speedtest
.speedtest pic