-
Notifications
You must be signed in to change notification settings - Fork 851
Onepush configuration [CN]
Xm798 edited this page Aug 19, 2022
·
13 revisions
Alas 使用 Onepush 提供消息推送。可接入各种消息平台,例如 Bark, ServerChan, Discord, 邮件等。 支持列表见 Onepush providers
请推送配置部分中的各服务文档获取需要的推送参数。
没写到的欢迎补充
配置为 json 格式,顶层为字典,需要提供 推送服务名 provider
和对应的 参数字典 params
。
{
"provider": "bark",
"params": {
"key": "Vg*******************"
}
}
更多参数,例如添加 sound
{
"provider": "bark",
"params": {
"key": "Vg*******************",
+ "sound": "alarm"
}
}
Key 的详细获取方式
以 Bark 为例,在 Onepush 仓库中,查看 providers/bark.py
_params = {
'required': ['key'],
表示该推送方法需要填写参数 key
。
使用默认服务器时,在服务器列表中可以找到 key
(红框标示处)
展开图片
即 Vg*******************
如果你有自己的 bark 服务器,需要将完整链接作为 key
即 https://bark.xxx.xxx/Fkq5***************
{
"provider":"smtp",
"params":{
"host": "smtp.qq.com", // smtp 服务器地址
"user": "[email protected]", // 用户名,通常是你的邮箱。
"password": "Passw0rd!", // 登录密码,一般为需要单独申请的授权码。
"port": "465", // smtp 服务器端口,如果有提供ssl端口(465)建议使用。
// "ssl": "true" // 显式指定使用ssl连接,端口是465时不要填写此项。
}
}
{
"provider": "smtp",
"params": {
"host": "smtp.gmail.com",
"port": 587,
+ "ssl": true,
"user": "[email protected]",
"password": "abcdefghijklmnopq"
}
}
常见邮箱
-
163邮箱: https://note.youdao.com/ynoteshare/index.html?id=f9fef46114fb922b45460f4f55d96853
- host:
smtp.163.com
- port:
465
- host:
-
qq邮箱: https://service.mail.qq.com/cgi-bin/help?subtype=1&&no=166&&id=28
- host:
smtp.qq.com
- port:
465
- host:
-
gmail: https://support.google.com/mail/answer/7104828?hl=zh-Hans
- host:
smtp.gmail.com
- port:
587
- ssl:
true
- host:
{
"provider": "pushplus",
"params": {
"token": "xxxxxxxxxxxxxxxxxx"
}
}
{
"provider": "pushdeer",
"params": {
"pushkey": "xxxxxxxxxxxxxxxxxx"
}
}
Server 酱已停止运行,需使用 Turbo 版,免费版每天限制五条。
{
"provider": "serverchanturbo",
"params": {
"sctkey": "SCT16*************************"
}
}
{
"provider": "discord",
"params": {
"webhook": "https://discord.com/api/webhooks/12345678912345678900/verylongstring_veryveryverylongrandomstring"
}
}
{
"notifier": "telegram",
"params": {
"token": "16xxxxxxx:xxxxxxxxxxx", // 从 @BotFather 获取
"userid": "10000000", // 从 @userinfobot 获取
"api_url": "api.telegram.org" // 国内需使用反代 API 或网络代理
}
}
{
"provider": "pushdeer",
"params": {
"corpid": "xxxxxxxx",
"corpsecret": "xxxxxxxx",
"agentid": "10001"
}
}
{
"provider": "pushdeer",
"params": {
"key": "xxxxxxxx"
}
}
{
"provider": "pushdeer",
"params": {
"token": "xxxxxxxx"
}
}
{
"notifier": "gocqhttp",
"params": {
"endpoint": "http://cqhttp.example.com:5700",
"access_token": "YOUR_TOKEN", // 设置了 access_token 时需要
"message_type": "private", // private 为私聊消息,group 为群聊消息
"user_id": "12345678", // message_type 为 private 时需要
"group_id": "12345678" // message_type 为 group 时需要
}
}
最后将得到的 json 填入 Alas 设置 -> 调试设置 -> 错误推送设置 即可
Getting Started
- Installation [EN]
- Installation [CN]
- Installation With Docker [EN]
- Emulator Support [CN]
- FAQ [EN/CN]
- FAQ [JP]
- Troubleshooting [EN]
- Another Installation guide
- Research Filter String [EN]
- Research Filter String [CN]
- Reward Shop Filter String [EN/CN]
- Onepush Configuration [EN]
- Onepush Configuration [CN]
Development
- Perspective [CN]
- Perspective [EN]
- Debug perspective [CN]
- Debug perspective [EN]
- Item Statistics [EN]
- 1. Start
- 2.1. Debugging
- 2.2. Multi-server support
- 3.1. Utils
- 3.2. Decorators
- 3.3. Log
- 3.4. Exception
- 4.1. Detection objects
- 4.2. UI control
- 4.3. OCR
- 4.4. State loop
- 5.1. Local Map
- 5.2. Create globe Map
- 5.3. Globe Map
- 6.1. GUI Option
MISC