Twitter Brand Notifications in Discord
This app automatically sends you a notification in Discord when a new tweet
matching specified keywords or user accounts is created. As an example, installing
the app with a specified keyword of
autocode and a specified account name of
@AutocodeHQ will send Discord notifications on new tweets containing either
autocode or tweets from the
Autocode Twitter account. Thus, a tweet like this:
Will result in a message in Discord like this:
It's great for keeping an eye on trends and mentions — we even use it
internally at Autocode! All you need to install it are Twitter account,
a Discord guild that you're an admin of, and your Autocode account.
How It Works
Immediately upon installation, if you linked your Discord bot correctly, you
will see a message like this in your chosen channel:
Once a minute, the Autocode scheduler
functions/events/scheduler/minutely.js endpoint and searches for
tweets matching the specified keywords and accounts using the search.tweets.list endpoint of the
This means that notifications may take up to a minute to appear.
To avoid duplicate alerts, the app uses the
utils.kv API to store the last tweet it
sent a notification for.
If you would like to change the search items after installing, open your
env.json file and change the
BRAND_TWITTER_KEYWORDS environment variables.
Extending This App
If you want notifications on more complex queries, feel free to edit the code for this app after
installation by updating the
q parameter to the twitter.tweets
API call. For more details on Twitter's query language, see
this page from their docs.
If you have any questions or feedback, please join our community Discord guild
from the Docs tab in the top bar. You can also follow us on Twitter, @AutocodeHQ.