GithubHelp home page GithubHelp logo

jrh3k5 / freegames-xmtp Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 852 KB

An XMTP bot that broadcasts announcements of free games over XMTP to subscribers

License: Apache License 2.0

JavaScript 99.11% Shell 0.89%

freegames-xmtp's People

Contributors

dependabot[bot] avatar jrh3k5 avatar

Watchers

 avatar

freegames-xmtp's Issues

Number of attributes exceeded

We're no longer able to enqueue game data due to this error:

InvalidParameterValue: Number of message attributes [11] exceeds the allowed maximum [10]

Handle prime store better

The prime store value isn't getting handled well:

image

This should be "Amazon Prime", not just "prime".

Consider, also, adding a disclaimer that this is only for Amazon Prime subscribers.

Undefined original price

Got a notification of a game with an undefined original price - perhaps this game had no original USD price?

Screenshot_20240220-165843

Image cache doesn't work

Looks like cached images don't read out correctly - getting this error:

xmtp-webhook-1  | Failed to send image for game ID 565940 TypeError: Method get TypedArray.prototype.length called on incompatible receiver [object Object]
xmtp-webhook-1  |     at get length [as length] (<anonymous>)
xmtp-webhook-1  |     at Object.encode (/home/node/app/node_modules/@xmtp/proto/ts/dist/cjs/message_contents/content.pb.js:152:29)
xmtp-webhook-1  |     at Client.encodeContent (file:///home/node/app/node_modules/@xmtp/xmtp-js/dist/index.js:5412:39)
xmtp-webhook-1  |     at async ConversationV2.send (file:///home/node/app/node_modules/@xmtp/xmtp-js/dist/index.js:1735:25)
xmtp-webhook-1  |     at async Notifier.sendGameImage (file:///home/node/app/xmtp/notify/notifier.js:46:9)
xmtp-webhook-1  |     at async Notifier.notify (file:///home/node/app/xmtp/notify/notifier.js:16:13)
xmtp-webhook-1  |     at async Consumer.handleMessage (file:///home/node/app/queue/user_notification.js:33:9)
xmtp-webhook-1  |     at async Consumer.executeHandler (/home/node/app/node_modules/sqs-consumer/dist/consumer.js:373:26)
xmtp-webhook-1  |     at async Consumer.processMessage (/home/node/app/node_modules/sqs-consumer/dist/consumer.js:254:34)
xmtp-webhook-1  |     at async Promise.all (index 0)

Handle large images more gracefully

Consider implementing remote attachments or, failing that, at least don't try to attach images that are too large and generate this error:

Failed to send image for game ID 111718 GrpcError: message too big
    at GrpcError.fromObject (file:///opt/freegames-xmtp/node_modules/@xmtp/xmtp-js/dist/index.js:2209:16)
    at HttpApiClient._publish (file:///opt/freegames-xmtp/node_modules/@xmtp/xmtp-js/dist/index.js:2300:33)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Client.publishEnvelopes (file:///opt/freegames-xmtp/node_modules/@xmtp/xmtp-js/dist/index.js:5365:9)
    at async ConversationV2.send (file:///opt/freegames-xmtp/node_modules/@xmtp/xmtp-js/dist/index.js:1743:9)
    at async Notifier.sendGameImage (file:///opt/freegames-xmtp/xmtp/notify/notifier.js:46:9)
    at async Notifier.notify (file:///opt/freegames-xmtp/xmtp/notify/notifier.js:16:13)
    at async Consumer.handleMessage (file:///opt/freegames-xmtp/queue/user_notification.js:35:9)
    at async Consumer.executeHandler (/opt/freegames-xmtp/node_modules/sqs-consumer/dist/consumer.js:373:26)
    at async Consumer.processMessage (/opt/freegames-xmtp/node_modules/sqs-consumer/dist/consumer.js:254:34) {
  code: 3
}

I'm attaching the offending image.
astro-duel-2-ukpi8

Allow one month free trial

Allow for a one-month free trial. Have the expiration messaging flex on whether or not the expiration is for a free trial.

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.