Skip to content

Commit

Permalink
doc: 添加命令scope相关文档
Browse files Browse the repository at this point in the history
  • Loading branch information
TBXark committed Aug 30, 2024
1 parent 0636b28 commit 3c33eac
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions doc/cn/CONFIG.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,3 +221,5 @@ COMMAND_DESCRIPTION_gpt3 = '/setenvs {"AI_PROVIDER": "openai", "OPENAI_CHAT_MODE
COMMAND_DESCRIPTION_gpt4 = '/setenvs {"AI_PROVIDER": "openai", "OPENAI_CHAT_MODEL": "gpt-4"}'
COMMAND_DESCRIPTION_cn2en = '/setenvs {"SYSTEM_INIT_MESSAGE": "You are a translator. Please translate everything I say below into English."}'
```

如果你想将自定义命令绑定到telegram的菜单中,你可以添加如下环境变量`COMMAND_SCOPE_azure = "all_private_chats,all_group_chats,all_chat_administrators"`,这样插件就会在所有的私聊,群聊和群组中生效。
2 changes: 2 additions & 0 deletions doc/en/CONFIG.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,3 +220,5 @@ COMMAND_DESCRIPTION_gpt3 = '/setenvs {"AI_PROVIDER": "openai", "OPENAI_CHAT_MODE
COMMAND_DESCRIPTION_gpt4 = '/setenvs {"AI_PROVIDER": "openai", "OPENAI_CHAT_MODEL": "gpt-4"}'
COMMAND_DESCRIPTION_cn2en = '/setenvs {"SYSTEM_INIT_MESSAGE": "You are a translator. Please translate everything I say below into English."}'
```

If you want to bind custom commands to the menu of Telegram, you can add the following environment variable `COMMAND_SCOPE_azure = "all_private_chats,all_group_chats,all_chat_administrators"`, so that the plugin will take effect in all private chats, group chats and groups.
2 changes: 2 additions & 0 deletions plugins/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ Then enter `/dns A www.baidu.com` in the command line to call the plugin.
Where `PLUGIN_COMMAND_dns` is the address of the plugin's json file, and `PLUGIN_DESCRIPTION_dns` is the description of the plugin.
`PLUGIN_COMMAND_dns` can be a complete json or a url of a json.

If you want to bind plugin commands to the menu of Telegram, you can add the following environment variable `PLUGIN_SCOPE_dns = "all_private_chats,all_group_chats,all_chat_administrators"`, so that the plugin will take effect in all private chats, group chats and groups.


## Interpolation Template

Expand Down
4 changes: 3 additions & 1 deletion plugins/README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ PLUGIN_DESCRIPTION_dns = "DNS查询 /dns <类型> <域名>"
然后在命令行中输入`/dns A www.baidu.com`即可调用插件

其中`PLUGIN_COMMAND_dns`是插件的json文件地址,`PLUGIN_DESCRIPTION_dns`是插件的描述。
`PLUGIN_COMMAND_dns`可以是完整的json也可以是一个json的url
`PLUGIN_COMMAND_dns`可以是完整的json也可以是一个json的url。

如果你想将插件命令绑定到telegram的菜单中,你可以添加如下环境变量`PLUGIN_SCOPE_dns = "all_private_chats,all_group_chats,all_chat_administrators"`,这样插件就会在所有的私聊,群聊和群组中生效。


## 插值模板
Expand Down

0 comments on commit 3c33eac

Please sign in to comment.