Git Product home page Git Product logo

telegram-twitch-notifications's People

Contributors

crashmax-dev avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

satont shzzos

telegram-twitch-notifications's Issues

Cannot read properties of undefined (reading 'game')

2022-12-25_14:29:51.88214 file:///home/c55038/twitch-notifications.na4u.ru/app/dist/twitch/eventsub.js:80
2022-12-25_14:29:51.88219             game: channelEntity.stream.game,
2022-12-25_14:29:51.88220                                        ^
2022-12-25_14:29:51.88221 
2022-12-25_14:29:51.88222 TypeError: Cannot read properties of undefined (reading 'game')
2022-12-25_14:29:51.88223     at EventSub.onStreamOffline (file:///home/c55038/twitch-notifications.na4u.ru/app/dist/twitch/eventsub.js:80:40)

Cannot read properties of null (reading 'topicId')

2022-12-27_04:17:09.25698 file:///home/c55038/twitch-notifications.na4u.ru/app/dist/twitch/eventsub.js:66
2022-12-27_04:17:09.25707             message_thread_id: channelEntity.topicId,
2022-12-27_04:17:09.25708                                              ^
2022-12-27_04:17:09.25709 
2022-12-27_04:17:09.25709 TypeError: Cannot read properties of null (reading 'topicId')
2022-12-27_04:17:09.25709     at EventSub.sendMessage (file:///home/c55038/twitch-notifications.na4u.ru/app/dist/twitch/eventsub.js:66:46)
2022-12-27_04:17:09.25710     at EventSub.onStreamOnline (file:///home/c55038/twitch-notifications.na4u.ru/app/dist/twitch/eventsub.js:54:14)
2022-12-27_04:17:09.25710     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Prevent duplicate notification

We can store information about the previous stream and compare the title and game category, if any of this changes, then send a new notification

GrammyError: Call to 'answerCallbackQuery' failed! (400: Bad Request: query is too old and response timeout expired or query ID is invalid)

GrammyError: Call to 'answerCallbackQuery' failed! (400: Bad Request: query is too old and response timeout expired or query ID is invalid)
2023-01-15_06:55:03.49734     at toGrammyError (/home/c55038/kopblto.na4u.ru/app/node_modules/grammy/out/core/error.js:35:12)
2023-01-15_06:55:03.49735     at ApiClient.callApi (/home/c55038/kopblto.na4u.ru/app/node_modules/grammy/out/core/client.js:86:48)
2023-01-15_06:55:03.49736     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2023-01-15_06:55:03.49736     at async run (/home/c55038/kopblto.na4u.ru/app/node_modules/grammy/out/composer.js:76:5)
2023-01-15_06:55:03.49737     at async Promise.all (index 1)
2023-01-15_06:55:03.49737     at async /home/c55038/kopblto.na4u.ru/app/node_modules/grammy/out/composer.js:61:13
2023-01-15_06:55:03.49738     at async /home/c55038/kopblto.na4u.ru/app/node_modules/grammy/out/composer.js:56:9
2023-01-15_06:55:03.49738     at async /home/c55038/kopblto.na4u.ru/app/node_modules/grammy/out/composer.js:56:9
2023-01-15_06:55:03.49739     at async /home/c55038/kopblto.na4u.ru/app/node_modules/grammy/out/composer.js:483:13
2023-01-15_06:55:03.49739     at async /home/c55038/kopblto.na4u.ru/app/node_modules/grammy/out/composer.js:61:13 {
2023-01-15_06:55:03.49741   error: GrammyError: Call to 'answerCallbackQuery' failed! (400: Bad Request: query is too old and response timeout expired or query ID is invalid)
2023-01-15_06:55:03.49742       at toGrammyError (/home/c55038/kopblto.na4u.ru/app/node_modules/grammy/out/core/error.js:35:12)
2023-01-15_06:55:03.49742       at ApiClient.callApi (/home/c55038/kopblto.na4u.ru/app/node_modules/grammy/out/core/client.js:86:48)
2023-01-15_06:55:03.49743       at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2023-01-15_06:55:03.49743       at async run (/home/c55038/kopblto.na4u.ru/app/node_modules/grammy/out/composer.js:76:5)
2023-01-15_06:55:03.49744       at async Promise.all (index 1)
2023-01-15_06:55:03.49744       at async /home/c55038/kopblto.na4u.ru/app/node_modules/grammy/out/composer.js:61:13
2023-01-15_06:55:03.49745       at async /home/c55038/kopblto.na4u.ru/app/node_modules/grammy/out/composer.js:56:9
2023-01-15_06:55:03.49745       at async /home/c55038/kopblto.na4u.ru/app/node_modules/grammy/out/composer.js:56:9
2023-01-15_06:55:03.49746       at async /home/c55038/kopblto.na4u.ru/app/node_modules/grammy/out/composer.js:483:13
2023-01-15_06:55:03.49747       at async /home/c55038/kopblto.na4u.ru/app/node_modules/grammy/out/composer.js:61:13 {
2023-01-15_06:55:03.49748     method: 'answerCallbackQuery',
2023-01-15_06:55:03.49748     payload: { callback_query_id: '902564990247954358' },
2023-01-15_06:55:03.49749     ok: false,
2023-01-15_06:55:03.49749     error_code: 400,
2023-01-15_06:55:03.49750     description: 'Bad Request: query is too old and response timeout expired or query ID is invalid',
2023-01-15_06:55:03.49750     parameters: {}
2023-01-15_06:55:03.49752   },
2023-01-15_06:55:03.49752   ctx: Context {
2023-01-15_06:55:03.49753     update: { update_id: 932213697, callback_query: [Object] },
2023-01-15_06:55:03.49753     api: Api { raw: {}, config: [Object] },
2023-01-15_06:55:03.49754     me: {
2023-01-15_06:55:03.49754       id: 5937425702,
2023-01-15_06:55:03.49755       is_bot: true,
2023-01-15_06:55:03.49755       first_name: 'Twitch Notifications',
2023-01-15_06:55:03.49755       username: 'twitch_alarm_bot',
2023-01-15_06:55:03.49756       can_join_groups: true,
2023-01-15_06:55:03.49756       can_read_all_group_messages: false,
2023-01-15_06:55:03.49757       supports_inline_queries: false
2023-01-15_06:55:03.49757     },
2023-01-15_06:55:03.49758     menu: {
2023-01-15_06:55:03.49758       update: [Function: update],
2023-01-15_06:55:03.49759       close: [Function: close],
2023-01-15_06:55:03.49759       nav: [Function: nav],
2023-01-15_06:55:03.49760       back: [Function: back]
2023-01-15_06:55:03.49761     }
2023-01-15_06:55:03.49761   },
2023-01-15_06:55:03.49762   name: 'BotError'
2023-01-15_06:55:03.49762 }

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.