Console:
Twitter (thx for the follow 😀):
$ npm installYou need to install nodejs version 16.x.x or higher.
Check your version:
$ node --versionGo to Twitter for Developers and sign up to developer account.
Fill out the pages with information.
Go to Developer Portal then click on the Projects & Apps menu.
Select or create your project, then create an App.
If your created it, click on it and navigate to the Keys & Tokens tab.
You will see this:
At Consumer Keys click on the Regenerate button, then click on Yes, regenrate.
API Key = CONSUMER_KEY
API Key Secret = CONSUMER_SECRET
Rename .env.EXAMPLE to .env then paste the keys into it:
CONSUMER_KEY=key
CONSUMER_SECRET=key
You got back to the previous page. Now generate Access Token and Secret for user.
Access Token = ACCESS_TOKEN
Access Token Secret = ACCESS_TOKEN_SECRET
Save your keys into .env:
ACCESS_TOKEN=key
ACCESS_TOKEN_SECRET=key
Two functions in the comment at the bottom of the index.ts file.
run({ onlyOnce: true }); // set true or false (read more in index.ts)
runDaily(); // the run function but repeated every 24 hours automaticallyRemove the comment from the ones you want to use.
Run the script with this command:
$ ts-node indexIf not working, use this:
$ npm install ts-node typescript -gmeta.hint.js in data folder before doing anything.
You can put any image or video into the data folder.
After putting the files, you need to assign manually the files to descriptions and other options in meta.json.
Some example:
// text with poll
{
"files": [],
"text": "👋🏻 Hey there! Check out my new pic",
"poll": {
"duration": 120,
"options": ["Selection A", "Selection B", "Selection C", "Selection D"]
},
"isTweeted": false
}// text with media
{
"files": ["index.jpg"],
"text": "👋🏻 Hey there! Check out my new pic",
"isTweeted": false
}// only media
{
"files": ["video.mp4"],
"text": "",
"isTweeted": false
}// only text
{
"files": [],
"text": "👋🏻 Hey there! Check out my new pic",
"isTweeted": false
}// text with linebrakes
{
"files": [],
"text": "👋🏻 Hey there!\n\n#helloworld\nthis is another line", // multiline supported: \n for linebreak
"isTweeted": false
}if you have any questions, just open an issue here: Issues 100% not a rick roll





