Many people who use Discord send links from external sites. Though some sites may force the user to log in to see the content, which may just be a few lines of text or a short video. There are "fixer links" such as fixupx
and vxtiktok
which allows the content to be seen in discord without needing to log in or even click on the link.
It can be annoying to remember all the fixer links, especially since they may not be supported anymore. This bot cuts out the user needing to edit links by sending the "fixed" link whenever someone sends a support list.
Here is a list of all the sites that are supported and the bot will look out for
- Twitter/X
- Tiktok
These are steps for develoeprs who want to contribute to the bot. Please send an issue and we'll have a conversasion of your idea and if it fits the purpose of the bot. If/When you have a pr ready, please target the develop
branch and not master
.
Use npm i
or npm install
to add the missing pacakges
The bot has the following depencies
discord.js
v 14.16.3dotenv
v 16.4.5jest
v 29.7.0
- Duplicate the file
example.env
and rename the copy.env
- Add the missing variables
DISCORD_TOKEN
: the token of the botCLIENT_ID
: the id of the bot
There are a few scripts defined in package.json
to stream line to process. Each can be used by running npm run x
with x
being the command name.
Name | Description |
---|---|
register | Register all the slash commands |
restart | Either restarts all or one server's settings back to the default values |
missing-variables | If a server is missing a setting, it will be added with the default value |
Use node src\index.js
to run the bot
Unit tests are created to verify the bot is correctly dectecing links. Though they can be used in other causes as well. Please add them in tests
folder if your addtional is applicable.
These are the slash commands that the bot handles
Name | Description | Notes |
---|---|---|
/help | Gives a brief description of the bot and describes what each slash command works. | |
/toggle-bot | enables/disables the bot. If the bot is disabled, then the bot will not send a message when a target link is sent. | value : If true, the bot will be enabled. Otherwise, it will be disabled. |
/view-enabled-users | View who is able to use the /toggle-bot command | |
/allow-enable | Allows a specific user or role to enable/disable the bot. | - Will take the role OR user that will be added. Cannot take both parameters at once. - This can only be used by the server owner |
/disallow-enable | Remove a specific user or role from of enabling/disabling the bot. | - Will take the role OR user that will be removed. Cannot take both parameters at once. - This can only be used by the server owner |
/view-enabled | Tells if the bot is enabled/disabled |
- The instgram fixer (ddinstagram) does not work anymore, and I'm unware of another functional one. If you know of one, please send a pr/issue.