jrh3k5 / freegames-xmtp Goto Github PK
View Code? Open in Web Editor NEWAn XMTP bot that broadcasts announcements of free games over XMTP to subscribers
License: Apache License 2.0
An XMTP bot that broadcasts announcements of free games over XMTP to subscribers
License: Apache License 2.0
We're no longer able to enqueue game data due to this error:
InvalidParameterValue: Number of message attributes [11] exceeds the allowed maximum [10]
Add automatic cleanup of subscriptions to handle free trials.
The messages simply say "send ETH" right now, but don't tell the user what network to use.
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)
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
}
Implement a process to run periodically to deactivate expired subscriptions.
If a single game in a webhook request fails, the whole batch fails. This happened when a request was rate limited. Change the architecture to have the webhook enqueue just the game ID and have the consumer make the call to get the game details.
Allow for a one-month free trial. Have the expiration messaging flex on whether or not the expiration is for a free trial.
To ensure that the default notification accounts - which can be used for troubleshooting and monitoring - never have to pay ETH to subscribe, add a 'free forever' concept to the subscriptions model.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.