Skip to content

Commit 2044f1f

Browse files
committed
chore(docs): Updated README.md, INSTALLATION.md, and package.json files with new content, formatting, and dependencies.
1 parent df8b07e commit 2044f1f

File tree

3 files changed

+290
-132
lines changed

3 files changed

+290
-132
lines changed

README.md

Lines changed: 91 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,138 @@
11
# Code Module Cop - Telegram Group Management Bot
22

33
[![Telegram](https://img.shields.io/badge/Telegram-Join%20Chat-blue)](https://t.me/cmcopbot)
4+
[![MIT License](https://img.shields.io/badge/license-MIT-green)](./LICENSE)
5+
[![Node.js](https://img.shields.io/badge/Node.js-%3E%3D20.x-brightgreen)](https://nodejs.org/)
6+
[![npm](https://img.shields.io/badge/npm-%3E%3D6.x-orange)](https://www.npmjs.com/)
47

5-
Code Module Cop is a powerful and flexible group management bot for Telegram and a dedicated [CodeModule](https://t.me/CodeModule) bot designed to help admins manage and moderate their groups effectively. This bot offers various features including welcome messages, role management, auto replies, and more.
8+
**Code Module Cop** is a powerful and flexible Telegram bot designed for managing and moderating Telegram groups. This bot provides a set of advanced features such as role management, automated moderation, logging, and more, helping administrators manage their groups efficiently. It is built with the aim of streamlining group moderation and automating tasks that would otherwise require manual intervention.
9+
10+
For more information, join our [Telegram Group](https://t.me/cmcopbot) or check out the [CodeModule](https://t.me/CodeModule) bot!
611

712
## Features
813

9-
- **Moderation Tools**: Mute and ban users with automated handling of warnings.
10-
- **Welcome Messages**: Custom welcome messages for new members.
11-
- **Role Management**: Manage roles for admins, moderators, and members.
12-
- **Logging and Analytics**: Track group activity and generate reports.
14+
### 🔒 Moderation Tools
15+
16+
- Mute and ban users with automated warnings.
17+
- Automated handling of rule violations.
18+
19+
### 🎉 Welcome Messages
20+
21+
- Fully customizable welcome messages for new members.
22+
23+
### 🛡️ Role Management
24+
25+
- Assign and manage roles for admins, moderators, and members.
1326

1427
## Getting Started
1528

1629
### Prerequisites
1730

18-
- Node.js (v20.x or higher)
19-
- npm (v6.x or higher)
31+
Before you begin, ensure you have the following installed:
32+
33+
- [Node.js](https://nodejs.org/) (v20.x or higher)
34+
- [npm](https://www.npmjs.com/) (v6.x or higher)
2035

2136
### Installation
2237

23-
1. Clone the repository:
38+
1. **Clone the repository**:
39+
40+
First, clone the repository to your local machine:
41+
42+
```bash
43+
git clone https://github.com/CodeModule-ir/cop.git
44+
cd cmcop
45+
```
2446

25-
```bash
26-
git clone https://github.com/CodeModule-ir/cop.git
27-
cd cmcop
28-
```
47+
2. **Install dependencies**:
2948

30-
2. Install dependencies:
49+
Install the necessary dependencies via npm:
3150

32-
```bash
33-
npm install
34-
```
51+
```bash
52+
npm install
53+
```
3554

36-
3. **Set Up Environment Variables**
55+
3. **Set Up Environment Variables**
3756

38-
The bot requires specific environment variables to run correctly. These are stored in a `.env` file in the root directory of your project. This file should not be committed to version control, so ensure it is listed in your `.gitignore`.
57+
The bot requires environment variables to function correctly. Create a `.env` file in the root directory of your project and add the following variables:
3958

40-
Create a `.env` file in the root of your project directory with the following content:
59+
```env
60+
TELEGRAM_BOT_TOKEN=your_bot_token
61+
DB_USER=your_db_user
62+
DB_PASSWORD=your_db_password
63+
DB_HOST=localhost
64+
DB_NAME=your_db_name
65+
DB_PORT=5432
66+
DB_URL=postgres://your_db_user:your_db_password@localhost:5432/your_db_name
67+
DATABASE_URL=postgresql://your_db_user:your_db_password@host:port/database_name // Production
68+
PORT=3000
69+
WEB_HOOK=https://your-webhook-url-here
70+
NODE_ENV=development
71+
```
4172

42-
```env
73+
> Note: Be sure to replace placeholders like `your_bot_token` and `your_db_user` with your actual values. The `.env` file should **never** be committed to version control.
4374
44-
TELEGRAM_BOT_TOKEN=your_bot_token
45-
DB_USER=
46-
DB_HOST=
47-
DB_NAME=
48-
DB_PASSWORD=
49-
DB_PORT=
50-
DB_URL=postgres://username:password@host:port/database_name
51-
DATABASE_URL='' // for production
52-
```
75+
4. **Start the Bot**
5376

54-
4. **Start the Bot**
77+
Once the environment variables are set, you can start the bot by running the following command:
5578

56-
With the environment variables set, you can start the bot:
79+
```bash
80+
npm start
81+
```
5782

58-
```bash
59-
npm start
60-
```
83+
This will run the bot in **development mode**. For production deployment, set the `NODE_ENV` to `production`.
6184

62-
For detailed installation instructions, see the [INSTALLATION.md](./docs/INSTALLATION.md) file.
85+
For additional installation instructions, check the [INSTALLATION.md](./docs/INSTALLATION.md) file.
6386

6487
## Usage
6588

6689
### Commands
6790

91+
Below are the most commonly used commands in Code Module Cop:
92+
6893
- **/start**: Start interacting with the bot and receive a welcome message.
69-
- **/help**: Get assistance and see the list of available commands.
70-
- **/warn [reason]**: Issue a warning to a user. If a user accumulates three warnings, they will be automatically banned.
71-
- **/mute [time]**: Mute a user for a specified duration. Time can be specified in minutes (m), hours (h), or indefinitely.
94+
- **/help**: Display available commands and their descriptions.
95+
- **/warn [reason]**: Issue a warning to a user. Accumulating three warnings will result in an automatic ban.
96+
- **/mute [time]**: Mute a user for a specified time. Time can be in minutes (e.g., 10m), hours (e.g., 2h), or indefinitely.
7297
- **/ban**: Ban a user from the group permanently.
7398

74-
For detailed usage instructions, see the [USAGE.md](./docs/USAGE.md) file.
75-
7699
### Example
77100

78101
To mute a user for 10 minutes, use:
79102

80103
```plaintext
81-
/mute 10m (You must reply to the user.)
104+
/mute 10m (Reply to the user you want to mute.)
82105
```
83106

107+
For more detailed usage instructions, refer to the [USAGE.md](./docs/USAGE.md) file.
108+
109+
## Development
110+
111+
Running in Development Mode
112+
To run the bot in development mode, use:
113+
114+
```bash
115+
npm run start
116+
```
117+
118+
This starts the bot with ts-node for TypeScript support and includes stack traces for debugging.
119+
84120
## Contributing
85121

86-
**Read the Contributing Guidelines**: Before you start, please read our [CONTRIBUTING.md](./docs/CONTRIBUTING.md) file. It contains important information about how to contribute, including coding standards, how to set up your development environment, and the process for submitting changes.
122+
We welcome contributions to improve Code Module Cop. Before you start contributing, please review our [CONTRIBUTING.md](./docs/CONTRIBUTING.md) file. This document contains important guidelines regarding our coding standards, how to set up your development environment, and the process for submitting changes.
123+
124+
Please ensure that your contributions adhere to the project's coding guidelines and include proper test coverage where necessary.
87125

88126
## License
89127

90-
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
128+
Code Module Cop is open-source and licensed under the **MIT License**. You can read more about the license in the [LICENSE](LICENSE) file.
129+
130+
## Acknowledgments
131+
132+
- [Grammy](https://grammy.dev) - A library for building Telegram bots.
133+
- [Node.js](https://nodejs.org) - The runtime environment for this bot.
134+
- [PostgreSQL](https://www.postgresql.org) - The database used to store user data and group logs.
135+
136+
## Support
137+
138+
Need help? Join our [Telegram Chat](https://t.me/cmcopbot) or [open an issue in the GitHub Repository](https://github.com/CodeModule-ir/cop/issues).

0 commit comments

Comments
 (0)