Node.js app - twitch loyality bot + multichannel support using tmi.js and pg-promise
2220
$$$
- Posted:
- Proposals: 4
- Remote
- #1929965
- OPPORTUNITY
- Archived
Description
Experience Level: Expert
hello,
i need a simple but fast multichannel supporting tmi node.js loyality bot using pg-promise as postgresql client (https://github.com/vitaly-t/pg-promise) and tmijs (https://docs.tmijs.org/) as client for twitch´s tmi.
i done this already in about a hour by myself but its not working as expected.
this is why i need somebody to do it better and failsafe!
so the bot have to get all users from a channel (this he simple do while using the "names" event . it will fire several times depending on each channel and its size (client.on("names", function(channel, users) {)
this users must earn points per time (must be definable by var).
so for example every user get 10 point every minute.
also use the "notice" event to see if users get timeout by a mod so they will not get points until this timeout is over.
https://docs.tmijs.org/v1.2.1/Events.html
-----------------------
so all the above is all very easy to do and not any issue and should need not more then a few hours if you know what you are doing.
------------------------
the issue is that i always run into async based troubles and i dont know much about async/sync and promises and this stuff.
as the bot will run in many channels its possible that sometimes stuff not work well or crash if it get called same / multiple times and the huge amount of chatters made me just issues with some functions and data that is while working with it not actual anymore.
and you MUST use postgresql to store the chatters data and to increase their points.
because many huge channels will result in extremely much queries in short time the only way to do it is by using the npm module "pg-promise" i researched a lot and i think there is no faster way to run massive amounts of queries and do get them completed in a very short time.
i special refer to this two urls for better information
https://github.com/vitaly-t/pg-promise/wiki/Performance-Boost
https://stackoverflow.com/questions/44783797/nodejs-inserting-data-into-postgresql-error
keep in mind:
each user get his points for the channel where he is in.
he also could be in multiple channels where also the bot is in.
so the db table could be simple as this:
"id, chatter, channel, points"
so for node.js developers this is not a big task
dont apply for the job if you never worked with it!
i will simply ignore proposals that dont include any words about what i wrote here.
i expect that this job get be done in max 3 days. so just apply if you really have time now.
final notes:
when you complete your job i will modify the code to be able to join or part channels after the bot is already running.
.
so just to be clear. if the bot leaves a channel all the users of this channel should not get payed anymore
and for sure also if the bot joins a new channel all his users should get payed from this moment.
best wishes
dan
i need a simple but fast multichannel supporting tmi node.js loyality bot using pg-promise as postgresql client (https://github.com/vitaly-t/pg-promise) and tmijs (https://docs.tmijs.org/) as client for twitch´s tmi.
i done this already in about a hour by myself but its not working as expected.
this is why i need somebody to do it better and failsafe!
so the bot have to get all users from a channel (this he simple do while using the "names" event . it will fire several times depending on each channel and its size (client.on("names", function(channel, users) {)
this users must earn points per time (must be definable by var).
so for example every user get 10 point every minute.
also use the "notice" event to see if users get timeout by a mod so they will not get points until this timeout is over.
https://docs.tmijs.org/v1.2.1/Events.html
-----------------------
so all the above is all very easy to do and not any issue and should need not more then a few hours if you know what you are doing.
------------------------
the issue is that i always run into async based troubles and i dont know much about async/sync and promises and this stuff.
as the bot will run in many channels its possible that sometimes stuff not work well or crash if it get called same / multiple times and the huge amount of chatters made me just issues with some functions and data that is while working with it not actual anymore.
and you MUST use postgresql to store the chatters data and to increase their points.
because many huge channels will result in extremely much queries in short time the only way to do it is by using the npm module "pg-promise" i researched a lot and i think there is no faster way to run massive amounts of queries and do get them completed in a very short time.
i special refer to this two urls for better information
https://github.com/vitaly-t/pg-promise/wiki/Performance-Boost
https://stackoverflow.com/questions/44783797/nodejs-inserting-data-into-postgresql-error
keep in mind:
each user get his points for the channel where he is in.
he also could be in multiple channels where also the bot is in.
so the db table could be simple as this:
"id, chatter, channel, points"
so for node.js developers this is not a big task
dont apply for the job if you never worked with it!
i will simply ignore proposals that dont include any words about what i wrote here.
i expect that this job get be done in max 3 days. so just apply if you really have time now.
final notes:
when you complete your job i will modify the code to be able to join or part channels after the bot is already running.
.
so just to be clear. if the bot leaves a channel all the users of this channel should not get payed anymore
and for sure also if the bot joins a new channel all his users should get payed from this moment.
best wishes
dan
Daniel L.
100% (11)Projects Completed
12
Freelancers worked with
11
Projects awarded
28%
Last project
11 Feb 2021
Romania
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
Daniel , please share web app link to review.
Daniel L.09 Mar 2018there is no web app its a cli app
-
do you have to use this pg-promise.
I have another method for this promise.
thank you
gatoDaniel L.09 Mar 2018there is no more high performance way i know. im happy with 1 million inserts in a few minutes
606865606470
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies