I am trying to not use any Google services for notifications and so I’d like to make a script to send notifications via ntfy based on discord messages.

How would I get access programmatically to my own discord account? Do they even support it? They have bots, but is their api for DMs?


Edit: the solution may just be a bot in servers, then not responding to DMs unless they use signal

  • 418teapot@lemmy.world
    link
    fedilink
    English
    arrow-up
    8
    ·
    10 days ago

    It is likely not worth your effort as whatever you come up with will likely result in discord deactivating your account for breaking their ToS, or them breaking their API forcing you to constantly play catch-up.

    This is why open communication protocols are so important. Email is still as ubiquitous as it is because it’s a protocol, not an API.

    I personally think it would be less overall effort to get your friends to switch to an open protocol like matrix, or XMPP than it would playing cat and mouse with proprietary APIs. But you do you, I wish you the best of luck!

  • trollblox_@programming.dev
    link
    fedilink
    English
    arrow-up
    4
    ·
    10 days ago

    you can’t access your own account. you can have a bot sit in the server and read messages, but after a certain number of joined servers you will need approval from discord to continue.

  • TheButtonJustSpins@infosec.pub
    link
    fedilink
    English
    arrow-up
    3
    ·
    9 days ago

    Check out Discord’s Webhooks; many applications publish notifications through them. Should be as easy as sending a message to a specific URL, I think.

  • Lemongrab@lemmy.one
    link
    fedilink
    English
    arrow-up
    2
    ·
    10 days ago

    Self-boting is against ToS. You have to be careful when interacting with the Discord API. Maybe there is a way to run the discord website to fetch text messages.

  • Undaunted@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    1
    ·
    9 days ago

    Discord recently added “user installable apps”. You can configure it though the installation context. I have only implemented the usual server installable apps so far, so I don’t know what the apps in the new context are able to do. But it might be worth a look :)