Code Monkey home page Code Monkey logo

minecraft-discord-bot's Introduction

Minecraft Discord Bot

Discord bot for a private docker hosted minecraft server. This bot currently isn't hosted publicly so you'll need to host it yourself (preferably also in docker).

Features

  • Message a channel whenever someone leaves or joins your server.
  • Displaying the number of currently online players in the bots game activity.
  • A number of useful commands (!minecraft help):
    • Restarting the server
    • Adding users to the whitelist
    • Listing the online players
    • Sending a message to players on the server

Requirements

For most of the commands to work you'll need to be running your actual minecraft server in docker in a container called 'mc'.

Docker

The docker images can be built with this command:

docker build -t minecraft-discord-bot:latest .

You must provide the following environment variables with the -e flag:

  • DISCORD_BOT_TOKEN
  • MINECRAFT_HOSTNAME
  • GUILD_ID
  • CHANNEL_NAME

Most of the commands expect your server to be running in docker with the container name 'mc'.

So if you are running the bot in docker you'll need to mount the docker socket from the host into the bots container (docker in docker! aka dind).

Example docker run command:

docker run -e DISCORD_BOT_TOKEN=REPLACE_ME \
    -e MINECRAFT_HOSTNAME=REPLACE_ME \
    -e GUILD_ID=REPLACE_ME \
    -e CHANNEL_NAME=REPLACE_ME \
    -v /var/run/docker.sock:/var/run/docker.sock \
    -it minecraft-discord-bot:latest

minecraft-discord-bot's People

Contributors

joeecarter avatar

Watchers

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