mirror of
https://github.com/thedevs-network/the-guard-bot
synced 2025-08-31 06:05:22 +00:00
0ed763baf79de44e83d7d46d64a783eb2a9efcda
The Guard Bot
The Guard is a Telegram bot made to help admins manage their groups.Initially created to moderate The Devs Network.
NOTE: The Guard is still in alpha phase and is not ready for production
Setup
You need Node.js (> 8.1) to run this bot.
- Create a bot via @BotFather and grab a token.
- Clone this repository or downlaod zip.
- Install dependencies via
npm install
. - Copy
config.example.json
toconfig.json
, fill it properly and remove comments. - Start the bot via
npm start
.
Now you can add the bot as administrator to your groups.
Commands
Command | Role | Available at | Description |
---|---|---|---|
/admin |
Master | Everywhere | Makes the user admin. |
/unadmin |
Master | Everywhere | Demotes the user from admin list. |
/leave <name|id> |
Master | Everywhere | Make the bot to leave the group cleanly. |
/warn <reason> |
Admin | Groups | Warns the user. |
/unwarn |
Admin | Everywhere | Removes the last warn from the user. |
/nowarns |
Admin | Everywhere | Clears warns for the user. |
/getwarns |
Admin | Everywhere | Shows a list of warns for the user. |
/ban <reason> |
Admin | Groups | Bans the user from groups. |
/unban |
Admin | Everywhere | Removes the user from ban list. |
/addcommand |
Admin | In-Bot | Create a custom command. |
/removecommand <name> |
Admin | In-Bot | Remove a custom command. |
/staff |
Everyone | Everywhere | Shows a list of admins. |
/link |
Everyone | Everywhere | Shows the current group's link. |
/groups |
Everyone | Everywhere | Shows a list of groups which the bot is admin in. |
/report |
Everyone | Everywhere | Reports the replied-to message to admins. |
/commands |
Everyone | In-Bot | Shows a list of available commands. |
/help | /start |
Everyone | In-Bot | How to use the bot. |
All commands and actions are synchronized across all of the groups managed by the owner and they work with both replying and mentioning a user.
If used by reply, /ban
and /warn
would remove the replied-to message.
The bot is still in alpha phase so feel free to open issues and ask for a feature.
The Guard icon from Entypo+ by Daniel Bruce.
Languages
JavaScript
79.6%
TypeScript
20.3%
Dockerfile
0.1%