inital commit
This commit is contained in:
14
app/sendNotification.ts
Normal file
14
app/sendNotification.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import * as Bun from "bun";
|
||||
|
||||
export function sendNotification(title: string, body: string, click?: string) {
|
||||
const command = [
|
||||
"python",
|
||||
"./app/notification.py",
|
||||
`--title=${title}`,
|
||||
`--body=${body}`,
|
||||
];
|
||||
if (click) {
|
||||
command.push(`--click=${click}`);
|
||||
}
|
||||
Bun.spawn(command);
|
||||
}
|
||||
Reference in New Issue
Block a user