discord-cleverbot
is a Discord bot that allows users to interact with the Cleverbot chat bot on Discord. It is developed in TypeScript and relies on the Node module of cleverbot-free.
The project was started in December 2017 and has been completely rewritten several times to improve functionality, efficiency, modernity, and simplicity.
Without a specific license, this code is the direct intellectual property of the original developer. It may not be used, copied, modified, or shared without explicit permission. Please see GitHub's guide on licensing and choosealicense.com.
For legal reasons, if you choose to contribute to this project, you agree to give up your copyright and hand over full rights to your contribution. However, you will still be attributed for your work on GitHub. Thank you!
- Create a new bot account in the Discord Developer Portal.
- Copy the access token of your bot for later.
- You will need an environment with Node installed (or use the Dev Container - see the Development section below).
- Run
git clone https://github.com/JstnMcBrd/discord-cleverbot.git
to clone the repo. - Create a new file called
.env
and add your access token, using.env.example
as an example.
- In the top directory, run
npm install
to download all necessary packages. - Run
npm run build
to build the project. - Run
npm run commands
to register slash commands with Discord. - Run
npm start
to start the bot.
- In the OAuth2>URL Generator tab in the Discord Developer Portal, generate an invite URL with the
applications.commands
scope. - Use the invite URL to add the bot to a server.
- Use the
/whitelist
command in a channel to allow the bot to speak there. - Send messages in the whitelisted channel and watch the bot respond!
Visual Studio Code is the recommended IDE for development. All settings are included as artifacts in the .vscode
folder and will automatically apply. You can use the built-in debugger and set breakpoints to troubleshoot the code.