This Discord bot is built using Discord.js and comes with some features I found useful at the time.
The /showtopreactions
command fetchs and display the message with the highest count of any single reaction in the current channel. Limited implementation so far due to rate limits of discord API, requires cleanup.
With the /postArchivedEmbed
command, messages from the current channel can be posted in another channel for the purpose of preserving channel content before deletion. It uses the into a readable and shareable format. It uses DiscordChatExporter to create a archived copy of channel in json format, which it uses to post archived messages.
TODO: Integrate DiscordChatExporter neatly and automate the process even further.
To get started with the DiscordBot, follow these steps:
-
Clone the repository to your local machine.
git clone https://github.com/OkabeKiyouma/DiscordBot.git
-
Install the required dependencies.
npm install
-
Set up your Discord bot on the Discord Developer Portal and obtain your bot token.
-
Create a
config.json
file in the project root and add your Discord bot token.{ "token": your-bot-token, "clientId": your-client-id, "guildIds" : array-of-server-ids, "MALClientId": your-mal-client-id }
-
Deploy slash commands (During initial setup or slash commands are modified, added or removed.)
node deploy-commands.js
-
Run the bot.
node index.js
Feel free to contribute to the development of this Discord bot! You can submit bug reports, suggest new features, or even create pull requests.
Special thanks to the developers of Discord.js and DiscordChatExporter for their excellent libraries that made this bot possible.