e-amusement Maintenance Bot is an Express application that serves vigilant maintenance warnings as Tweets on the Twitter account, @eamuse_schedule.
During e-amusement's Maintenance periods, players cannot use an e-amusement pass to log into certain games, limiting many of its in-game features. The Extended Maintenance, which falls on the third Tuesday of every month from 02:00 - 07:00 JST, is of particular concern for the following reasons:
- ❌ All e-amusement branded games are put offline for maintenance
- ❌ Third Tuesdays from 02:00 - 07:00 JST falls on the prior Monday from 13:00 - 18:00 ET, where the Western player base remains awake
- ❌ Some players unfortunately make trips to the arcade without knowing Extended Maintenance is taking place
With a predictable schedule, we can create an automated application that interfaces with the Twitter API, posting Extended Maintenance warnings prior to scheduled service.
An example of a warning Tweet, seen below
In order to accomodate for differing Twitter timeline behavior, it is critical to send out scheduled tweets in multiple intervals.
Currently, Tweets are scheduled to post as follows:
- Three days before Extended Maintenance day
- One day before Extended Maintenance day
- Two hours before Extended Maintenance
- Once Extended Maintenance begins
Additionally, sending out Tweets that provide the user with information regarding Extended Maintenance conclusion is expected to help players plan their trips better:
- One hour before Extended Maintenance ends
- Once Extended Maintenance ends
This project uses npm as its package manager.
A Twitter Developer account with elevated access is required to interface with Twitter API and its v1 endpoint, which allows our Express instance to post Tweets. Read more here.
For the purposes of this project, the account you are automating tweets from MUST be the same account you are using for developer purposes. In other words, it is necessary to create a separate Twitter account for this project. This separate Twitter account must also have developer Elevated Access. If you are interested in performing actions on behalf of another Twitter account, check out Twitter's 3-legged OAuth flow.
After creating an account and getting approved for elevated access, enter the developer portal and create a new project.
Take note of your API Key and API Key Secret. They will be used to authenticate your Express client to use the v1 endpoint.
Click on the "Keys and tokens" tab and generate your Access Token and Secret.
You should have 2 Keys and 2 Secrets now, which will allow us to authenticate with the Twitter API v1 endpoint.
After cloning the repository, change directory into the project's root and create a .env
. You will be storing your Twitter API keys & secrets here.
cd twitter-eamuse-warn
touch .env
Inside your .env
, add your Twitter keys
TWITTER_ACCESS_TOKEN = YOUR_TWITTER_ACCESS_TOKEN_HERE
TWITTER_ACCESS_TOKEN_SECRET = YOUR_TWITTER_ACCESS_TOKEN_SECRET_HERE
TWITTER_API_KEY = YOUR_TWITTER_API_KEY_HERE
TWITTER_API_SECRET = YOUR_TWITTER_API_SECRET_HERE
Install dependencies
npm i
Start the development server
node server.js
- Core functionality implemented (Extended Maintenance scheduled tweets)
- Alpha release testing to a small group of users. Awaiting the next scheduled Extended Maintenance which is happening on 10/17/2022 @ 13:00 ET
- Qualitative survey (as of 10/17)
- Low sev bug fix - #1
- Migration to Azure once Heroku ends free Dynos (Completed 12/1)
- West Coast time zone addition to tweets (Completed 12/12 & Confirmed 12/19 5P ET, Tested next 10 cycles, Awaiting prod confirmation on 12/19 5P ET)
- Created a Discord bot that would post according to the same schedules as the Twitter bot. Includes interactivity, like on-demand slash commands and .ics generation. Needs channel management features (Completed 2/4)
- Discord Bot integration
- Add relative timestamps that are local to a user's machine for the discord bot
- Update documentation
- Place upcoming Extended Maintenance information in bio for quick access
PRs are welcome! Please directly DM the @eamuse_schedule account with suggestions, comments, or concerns.
Additionally, feel free to log new issues with sufficient details regarding your concerns.