feat: add qq push
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
export function sendMsg(msg: string, target_id: string, bot_url: string): Promise<Response> {
|
||||
const replyMessage = {
|
||||
user_id: String(target_id),
|
||||
message: [
|
||||
{
|
||||
type: "text",
|
||||
data: {
|
||||
text: msg
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
return fetch(bot_url, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: JSON.stringify(replyMessage)
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user