mirror of
https://github.com/whyour/qinglong.git
synced 2025-07-30 00:16:07 +08:00
Update notify.ts
This commit is contained in:
parent
e61c0e1fb5
commit
cd75afe793
|
@ -17,6 +17,7 @@ export default class NotificationService {
|
|||
['goCqHttpBot', this.goCqHttpBot],
|
||||
['serverChan', this.serverChan],
|
||||
['pushDeer', this.pushDeer],
|
||||
['chat', this.chat],
|
||||
['bark', this.bark],
|
||||
['telegramBot', this.telegramBot],
|
||||
['dingtalkBot', this.dingtalkBot],
|
||||
|
@ -135,6 +136,22 @@ export default class NotificationService {
|
|||
);
|
||||
}
|
||||
|
||||
private async chat() {
|
||||
const { chatUrl, chattoken } = this.params;
|
||||
const url = `${chatUrl}${chatUrl}`;
|
||||
const res: any = await got
|
||||
.post(url, {
|
||||
timeout: this.timeout,
|
||||
retry: 0,
|
||||
body: `payload={"text":"${this.title}"}`,
|
||||
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
||||
})
|
||||
.json();
|
||||
return (
|
||||
res.success
|
||||
);
|
||||
}
|
||||
|
||||
private async bark() {
|
||||
let { barkPush, barkIcon, barkSound, barkGroup } = this.params;
|
||||
if (!barkPush.startsWith('http') && !barkPush.startsWith('https')) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user