New NER Discord Bot for Twitter Closures
Hello New England (and everyone else)!
When I first joined the NER Discord I noticed that there was an unused #twitterfeed channel that appeared to go unused for a while. I could tell that the leadership was most likely using webhooks and most likely a service like IFTTT (If This Then That), which was later confirmed. The downside with using IFTTT is that sometimes there would be up to a 15 minute delay from when the tweet was sent out publicly to when it would be sent to the webhook channel.
With the help of johnninja58 and Elli21486, as well as the support from the NER SMs, I would like to introduce the new way NER will be getting Twitter updates sent straight to its Discord.
NER Traffic Alerts is a Discord bot account that is coded using JS (JavaScript). The bot utilizes Twitter's API to look at specific Twitter accounts and pull certain tweets, based on a filter, and post them in a state's Twitter feed. Because the bot is looking directly at the Twitter API and checking every 60 seconds, the tweet will be sent to the channel usually within 60 seconds from being posted.
Below I have listed the current Twitter accounts that we are following for each state:
Most of the above Twitter accounts were used during testing and can be modified in anyway, based on what each SM decides they'd like in their feed. Just let me know and I can change it!
The bot looks for the following words in a tweet to send an alert:
But will also filter out a tweet if it has the following:
If you have any issues that you notice, such as certain tweets making it through the filter when they shouldn't have, please don't hesitate to reach out!
When I first joined the NER Discord I noticed that there was an unused #twitterfeed channel that appeared to go unused for a while. I could tell that the leadership was most likely using webhooks and most likely a service like IFTTT (If This Then That), which was later confirmed. The downside with using IFTTT is that sometimes there would be up to a 15 minute delay from when the tweet was sent out publicly to when it would be sent to the webhook channel.
With the help of johnninja58 and Elli21486, as well as the support from the NER SMs, I would like to introduce the new way NER will be getting Twitter updates sent straight to its Discord.
NER Traffic Alerts is a Discord bot account that is coded using JS (JavaScript). The bot utilizes Twitter's API to look at specific Twitter accounts and pull certain tweets, based on a filter, and post them in a state's Twitter feed. Because the bot is looking directly at the Twitter API and checking every 60 seconds, the tweet will be sent to the channel usually within 60 seconds from being posted.
Below I have listed the current Twitter accounts that we are following for each state:
Code: Select all
CT: CT_STATE_POLICE, CTDOT_Statewide, TollandAlert
Code: Select all
MA: "MassStatePolice, MassDCR, MassDOT, TotalTrafficBOS, lawrencepolice, HaverhillPolice, TewksburyPD, WBZTraffic, ChelseaScanner, reverescanner, 5_13Dist, LowellPD, WilmingtonMAPD, WorcesterEM, bostonpolice, SpencerMAPolice, BelmontPD, MethuenPolice, DanversPolice, Falmouth_Police
Code: Select all
ME: MEStatePolice, MaineTurnpike, MaineDOT1
Code: Select all
NH: NH_StatePolice, NHDOTRoutes, nhdoti93, NHDOTI293, NHDOTNH101, NHDOTI89, NHDOTEverett, NHDOTSpaulding, manch_nh_hiway, pelhamnhpolice, rocksheriffnh, HamptonNHPD, ConcordNHGS, AtkinsonPolice, DoverNHPolice, nashuadpw
Code: Select all
RI: RIStatePolice, RIDOTNews
Code: Select all
VT: VTStatePolice, VTDMV, 511VT
The bot looks for the following words in a tweet to send an alert:
Code: Select all
closed, closure, all lanes closed, ramp blocked, off-ramp, ramp open, ramp reopen, ramp re-open, traffic alert
Code: Select all
one lane, two lanes, right lane, right travel lane, rtl, left lane, left travel lane, LTL, except right, except left, center lane, 2 lanes, 1 lane, partial, sidewalk, 3 right lanes, 3 left lanes, shoulder open, breakdown lane open, break down lane open, office, library, clear, cleared, report , service center, school, Tech, Institute, College, University, DMV, RMV, advance notice, advanced notice, overnight, intermittently, temporary
Re: New NER Discord Bot for Twitter Closures