This is a simple Discord bot that can shorten URLs using the TinyURL API. It also has a help command that provides instructions on how to use the /shorten
command.
- Clone the repository:
git clone https://github.com/daveonHMD/discord-url-shortener-bot.git
- Navigate to the project directory:
cd discord-url-shortener-bot
- Install the dependencies:
npm install
- Rename
.env.example
to.env
and add your Discord bot token and Infinity Bots API token. - Start the bot:
node index.js
- Invite the bot to your Discord server using your bot client ID
- Use the
/shorten
command to shorten a URL:/shorten <url>
. Example:/shorten example.com
(do not addhttps://
) - Use the
/help
command to get help with the/shorten
command:/help
- discord.js - Discord API library
- node-fetch - A light-weight module that brings
window.fetch
to Node.js - express - Fast, unopinionated, minimalist web framework for Node.js
- @discordjs/builders - A command builder for Discord.js v13
- discord-api-types - TypeScript types for Discord API
- @infinitybots/autoposter - An autoposter for Infinity Bot List API