Skip to content

joaocmd/vxTwitterBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vxTwitterBot

A Discord bot that replaces messages that contain https://twitter.com URLs with https://vxtwitter.com (https://github.com/dylanpdx/BetterTwitFix).

Usage

Copy the config-template.json to a config.json and edit as necessary. The config file is structured as follows:

{
    "DISCORD_TOKEN": "<DISCORD_TOKEN_HERE>",
    "TWITTER_BEARER_TOKEN": "<TWITTER_BEARER_TOKEN_HERE>",
    "PREAMBLE": "wrote:\n", // message starts with "@mention wrote:\n"
    "MATCH": "https://twitter.com",
    "REPLACE": "https://vxtwitter.com"
}

The TWITTER_BEARER_TOKEN field can be left with an empty string. In that case, the bot uses the message embed to check if it contains a video. This method does not work for tweets with GIFs and does not always work because the embed might not load or might be loaded only after on_message is called.

Necessary bot permissions

The following permissions are necessary to run the bot:

  • Read Messages/View Channels (Requires message content intent)
  • Send Messages
  • Manage Messages
  • Embed Links

About

A Discord bot that replaces twitter URLs with vxtwitter for videos and GIFs.

Topics

Resources

License

Stars

Watchers

Forks