Skip to content

andesyv/ThonkBot

Repository files navigation

ThonkBot

A simple discord bot for thonking made using Node.js, Discord.js and TypeScript.

Add it to your server!

Commands

The slash-commands added should be visible by doing / in a text field in the Discord client. Most of the slash-commands have normal text-command equivilants, which can be accessed using ! instead of / (example: /cat and !cat). Some text commands also have additional aliases. All currently available text-commands and aliases can be found using !commands;

Contributing

Contributions are more than welcome! Fork the repository, do your changes and make a pull request.

Testing Environment

If you want to test features before making a pull request or if you want to host your own version of the bot, you'll have to create a bot instance and add it to a server where you have sufficient permissions before running the bot as a Node.JS application.

How do this?:

  1. First go to the Discord developer portal
  2. Create a new application (if you don't have one ready already)
  3. Attach a bot to your application
  4. Clone the repository locally: git clone https://github.com/andesyv/ThonkBot.git
  5. Copy the template.env to a file called .env in the root directory of the repository and fill it with you discord client ID, your bot token and a Giphy API key (optional).
  6. This bot reads nicknames and message content, and therefore requires the "server member intent" and "message content intent" to be checked.
  7. Head to the OAuth2 -> URL Generator tab
  8. Mark the bot and applications.commands scopes, and any additional permissions you think you'll need (or just Administrator for everything). You may get error messages if attempting to perform actions the bot does not have access to.
  9. Use the generated link to add your bot to a server.
  10. Install all the requirements for the bot. Below are some Linux instructions, but Windows follows a similar approach:
# Some Debian distros don't ship with the version of Node.JS used by the bot in their package managers, so to install Node.JS > 18 do this to fetch the package repos:
curl -sL https://deb.nodesource.com/setup_18.x | sudo bash -

# Install Node.JS > 18
sudo apt install -y nodejs

# (Optional) Install node packages used by the project.:
sudo npm install -g yarn typescript

# Install required packages:
yarn install # with yarn
npm install # with NPM
  1. Finally, run the application. If node-dev is installed (npm install -g node-dev) you can run the start script directly:
yarn start # Using yarn
npm start # Using npm

or you can compile the typescript and run the JS instead:

tsc # requires TypeScript to be globally installed
node ./dist/src/main.js

Licensing

The application is licenced under a standard MIT license

About

A very simple discord bot

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages