Coder Social home page Coder Social logo

tatsumaki-bot's Introduction

Tatsumaki-Bot

This is a Discord bot that reads command and response files from the commands and responses folders respectively and stores them in collections. The bot listens for interactions and messages, and executes commands or sends responses based on the content of the interaction or message. It also has the ability to join and leave voice channels.

Setup

  1. Install Node.js and npm.
  2. Clone this repository.
  3. Run npm install to install the required dependencies.
  4. Create a config.json file in the root directory and add your bot token like this:
    {
        "token": "your-bot-token"
    }

Commands

Commands for this bot are located in the commands directory. Each command should be a .js file with a data and execute property.

  • The data property should be an object that describes the command.
  • The execute property should be a function that runs when the command is called.

If a command file does not have these properties, a warning will be logged to the console.

Responses

Responses for this bot are located in the responses directory. Each response should be a .js file with a trigger and response property.

  • The trigger property should be a string or an array of strings that trigger the response when a message is sent in chat.
  • The response property should be a string or function that returns the message to send in chat.

If a response file does not have these properties, a warning will be logged to the console.

Running the Bot

Run node index.js to start the bot. Once it's ready, it will log its tag to the console.

Additional Files

Refreshing Application Commands

The bot includes a script for refreshing application commands. This script reads all command files, converts them to JSON, and sends them to Discord's API.

To run this script, use node deploy-commands.js.

Deleting Application Commands

The bot includes scripts for deleting guild-based and global application commands. These scripts send a DELETE request to Discord's API.

To run these scripts, use node delete-command.js.

tatsumaki-bot's People

Contributors

aryamaddel avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.