Skip to main content

A Discord bot to control a Minecraft Bedrock server remotely.

Project description

CraftLink

A Discord bot to control a Minecraft Bedrock server remotely.

Examples

Starting and stopping server via Discord.

Sending a message from Discord to Minecraft.

Security Disclaimer

While there is some validation around the commands sent to the server, it is important to note that it is not secure.

It is very likely that this could be abused to send and execute malicious code!

Setup

Operating System

Currently Windows only simply because that's where my server is living... but planning to bring to Linux, too!

Dependencies

Requires Python 3.9+.

Install via pip install craftlink.

Or, clone and run poetry install to install from source.

You'll need to download the Bedrock Server. You'll probably want to run this manually first to configure your world. You can migrate an existing local bedrock world to be a Bedrock server pretty easily by copying the world data into <server_directory>/worlds.

Running

To run the server, just invoke craftlink with the necesary arguments/environment variables set.

Required arguments:

  • -t, --discord-bot-token, DISCORD_BOT_TOKEN - Token to use to authenticate the Discord bot.
  • -c, --discord-channel-id, DISCORD_CHANNEL_ID - Discord channel ID to target the bot's messages to.
  • -d, --bedrock-server-install-directory, BEDROCK_SERVER_INSTALL_DIRECTORY - Directory that the Bedrock server executable is in.

Improvements

  • Add tests.
  • Add user roles at the bot level to restrict certain actions.
    • Could be multiple roles such that "admins" have all perms, "mods" have less, and "users" have none or just /say.
  • Be cool if this could run in a container altogether.

Affiliate Disclaimer

In no way affiliated with Microsoft or Mojang (that'd be dope though, feel free to reach out, folks).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

craftlink-0.0.1.tar.gz (7.0 kB view hashes)

Uploaded Source

Built Distribution

craftlink-0.0.1-py3-none-any.whl (8.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page