Deno Bot made in Deno used to like and retweet stuff with configured hashtags (primarily #denoland)
Fork this repository then import a project in Vercel from Git (https://vercel.com/import/git)
After your project is imported, add required env var ; from your project overview, "Setting > General > Environment Variables". You can found a template in .env.dist file.
This bot was not tested in other environement. But should works as Amazon Lambda. Please don't hesitate to edit this section if you succeed to make it work elsewhere.
Lambda to run manually or with a cron.
Will:
- get user favorited statuses (200)
GET favorites/list.json?include_entities=false
- save
status.id_str
- get user timeline (200)
GET statuses/user_timeline.json?include_entities=false
- save
status.id_str
withreteweeted_status
object (retweeted_status.id_str
) - search
#denoland && #deno_land && #parisdeno
and like and retweet if not already favorited and retweeted (100 items by default) - search
@deno_land && @ParisDeno
and like if not already favorited (100 items by default) - if famous mode filter
recent
type statuses, else filtermixed
(which ispopular
+recent
) - optionally send operation result to a Discord webhook (success and errors)
dr
|dryRun
|dry_run
|dry
- when set, will only read data and output (console, discord)famous
- when set, will filter found request to only statuses with at least 5 fav or RT. This can help limit the flood.
x-deno-bot-secret
- must be equivalent to env varDENO_BOT_SECRET
Most of TWITTER_
var can be found after creating a dev account and an app: https://developer.twitter.com/en/apps
Then go to "Keys and tokens" tab.
TWITTER_ACCESS_TOKEN
- App Access token ; used for OAuth1.0-aTWITTER_ACCESS_TOKEN_SECRET
- App Access token secret ; used for OAuth1.0-aTWITTER_CONSUMER_KEY
- User API keyTWITTER_CONSUMER_SECRET
- User API secret keyTWITTER_APP_ID
- App ID (found in "apps" page)WEBHOOK_ENV
- When using webhook, env name where to register subscriptionsDENO_BOT_SECRET
- more or less complexe pass(word|phrase) that shoud be set in headerDISCORD_WEBHOOK
- (Optional) http link to a discord webhook.
- add config for "famous" threshold
- webhook
- ignore my likes and retweets
- retweet pings
- auto reply DM with "Sorry I'm only a bot"