mirror of
https://github.com/aljazceru/chatgpt-telegram-bot.git
synced 2025-12-23 23:55:05 +01:00
Updated README.MD (chat id is actually user id)
This commit is contained in:
@@ -39,12 +39,12 @@ Customize the configuration by copying `.env.example` and renaming it to `.env`,
|
||||
OPENAI_EMAIL="<YOUR_OPENAI_EMAIL>"
|
||||
OPENAI_PASSWORD="<YOUR_OPENAI_PASSWORD>"
|
||||
TELEGRAM_BOT_TOKEN="<YOUR_TELEGRAM_BOT_TOKEN>"
|
||||
ALLOWED_TELEGRAM_CHAT_IDS="<CHAT_ID_1>,<CHAT_ID_2>,..."
|
||||
ALLOWED_TELEGRAM_USER_IDS="<CHAT_ID_1>,<CHAT_ID_2>,..."
|
||||
```
|
||||
You'll need to provide:
|
||||
1. Your OpenAI credentials (these are only sent to the OpenAI server to periodically refresh the access token and never shared). You can read more about it [here](https://github.com/acheong08/ChatGPT)
|
||||
2. Your Telegram bot's token, obtained using [BotFather](http://t.me/botfather) (see [tutorial](https://core.telegram.org/bots/tutorial#obtain-your-bot-token))
|
||||
3. A comma-separated list of Telegram chat IDs that are allowed to interact with the bot (use [getidsbot](https://t.me/getidsbot) to find your chat ID)
|
||||
3. A comma-separated list of Telegram user IDs that are allowed to interact with the bot (use [getidsbot](https://t.me/getidsbot) to find your user ID)
|
||||
|
||||
### Run
|
||||
Use the following command to start the bot:
|
||||
|
||||
2
main.py
2
main.py
@@ -20,7 +20,7 @@ def main():
|
||||
}
|
||||
telegram_config = {
|
||||
'telegram_bot_token': os.environ['TELEGRAM_BOT_TOKEN'],
|
||||
'allowed_chats': os.environ['ALLOWED_TELEGRAM_CHAT_IDS'].split(',')
|
||||
'allowed_chats': os.environ['ALLOWED_TELEGRAM_USER_IDS'].split(',')
|
||||
}
|
||||
|
||||
gpt3_bot = ChatGPT3Bot(config=chatgpt_config, debug=True)
|
||||
|
||||
Reference in New Issue
Block a user