Giter Site home page Giter Site logo

Comments (5)

vogler avatar vogler commented on June 12, 2024

Works fine for me. Docker or node? Does other configuration from your .env file get picked up?
Did you check the apprise docs for discord?
Run with DEBUG=1 to see the command used for apprise.

from free-games-claimer.

KairuByte avatar KairuByte commented on June 12, 2024

Running locally with node on Windows 11. Now that you mention it, some variables in the .env are honored, some are not. SHOW=0, DEBUG=1, and NOTIFY seem to be ignored, while BROWSER_DIR, PG_CLAIMDLC=1, and username/password/otp entries are all properly utilized.

And before it's asked, there's no particular order that I can tell. BROWSER_DIR is the first entry, DEBUG the second, followed by usernames and passwords, then SHOW.

I don't see anything in the appraise docs that would show any issues. I can attempt running the command with apprise directly tomorrow to ensure it works.

Edit: For the record, when running within docker NOTIFY does indeed work when the environment variable is set.

from free-games-claimer.

vogler avatar vogler commented on June 12, 2024

Maybe it's some syntax problem with (see dotenv) or the variables are already in your environment (values from .env have the lowest priority).
You can post the contents and just replace the sensitive data.

from free-games-claimer.

vogler avatar vogler commented on June 12, 2024

You can also run node test/notify.js to test with some dummy notifications.

from free-games-claimer.

KairuByte avatar KairuByte commented on June 12, 2024

I was finally able to sit down and work through this.

First issue, is that dotenv doesn't take single quotes, it takes double quotes. And double quotes only appear to be necessary if there is a hash (#) symbol. This is obviously an issue on my part, but honestly may be a good idea to call out in the documentation for notifications.

Next issue is that node test/notify.js fails even when this is corrected. The relevant part of the error is the syntax being passed to apprise: apprise discord://[snip]/[snip] -i html -b epic-games:<br>- <a href="https://gaming.amazon.com/home">Epistory - Typing Chronicles</a> (claimed) This errors on execution. When you run it directly with apprise you get the following:

At line:1 char:136
+ ... [snip] -i html -b epic-games:<br>- <a href=" ...
+                                                                 ~
The '<' operator is reserved for future use.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : RedirectionNotSupported

(For clarification, the error indicator is on the < in <a)

When you wrap the body (argument -b) in single quotes, it no longer errors: apprise discord://[snip]/[snip] -i html -b 'epic-games:<br>- <a href="https://gaming.amazon.com/home">Epistory - Typing Chronicles</a> (claimed)'

However the resulting notification does not actually include the anchor, it is simply displayed as plain text:
image

Of note, I believe that last point has always been the case. I don't believe I have ever seen an anchor tag work on a discord notification with this project.

from free-games-claimer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.