Giter Club home page Giter Club logo

discordbot's Introduction

Discord Bot

This is a Discord bot project based on Discord.js, using Docker for containerized deployment. The bot can respond to simple commands such as /ping and display its online status. In the future, it will support the creation of Todolist and time notifications.

System Requirement

  • Docker or Docker Desktop
  • Node.js 16

.env Setting

  1. Create an Application on Discord Dev
  2. Record the following parameters
    • client ID
    • token alt text
  3. Get Discord Channel ID Follow this guide to get your Channel Guild.

Build Set Up

  1. change parameters

    • your_discord_token
    • client ID
    • guild ID
  2. docker build and run

docker build -t my-discord-bot .
docker-compose up -d

alt text

After compose, you can see the container execution in Docker. And your Discord Bot is online. alt text alt text

If docker-compose not work, try the command below.

docker run -d --name discord-bot -e DISCORD_TOKEN=your_discord_token my-discord-bot

Or check docker logs to fix problems.

docker-compose logs

File Descriptions

  • index.js

    The main application file containing the bot's startup and command handling logic.

  • deploy.js

    A script used to register bot commands, which runs automatically during deployment.

  • Dockerfile

    Defines the Docker image build process, including dependency installation and application startup steps.

  • docker-compose.yml

    Defines the Docker Compose services to simplify running and managing the container.

References

discord.js

https://discord.js.org/

discordbot's People

Contributors

nishikino25 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.