

Can’t do it with random apps, but most FOSS apps, like Molly (fork of Signal), Element (matrix protocol), Tusky (for Mastodon), etc. use this.
I think using it for discord can be possible, but you would have to set up your own notification server. Like for Signal chats, there has to be another server between my notification server and Signal’s server (MollySocket), which listens to the notifications and sends it to my Ntfy. You will have to set something up that is always online waiting for new messages, and when new message arrives, it pings your Ntfy, and Ntfy pings your phone.
I was literally picking my nose when I saw this! 😭