Git Product home page Git Product logo

pythoncoderunnerbot's Introduction

Python Code Runner Discord Bot

This is a simple bot for running Python code through Discord. It was originally developed for the Beginner.Codes Discord server.

⚠️ USE AT YOUR OWN RISK ⚠️

This bot will allow any user to run Python code on the computer that is running the bot. The bot is designed to do this in as safe a manner as possible. There is no way to be 100% certain that it cannot be hacked.

Requirements

The bot uses Poetry for packaging and dependency management. You will need to follow the installation instructions before you can get started with the bot.

Additionally, you will need a bot token from Discord. You can read about how to get yours here.

Configuration & Setup

First things first, we need to install the dependencies. To do that install Poetry by running:

python -m pip install poetry

Next run Poetry to install the bot dependencies.

poetry install

Next you need to configure the bot with your settings. To do this copy the example.yaml file and name the new copy production.yaml.

Once that’s done open it up and in the bot section change the token string to your bot token.

Running

To run the bot you’ll need to be in the directory which you cloned the repo, and run the following command:

poetry shell

Once that runs you can start the bot by running

python -m bot

This will create a virtual environment with all the required dependencies and run the bot.

Allowed Modules

For safety reasons the bot only allows members to use a limited list of enabled modules. You can adjust this list by editing the bot/allowed_modules.txt file. Each line is an enabled module.

pythoncoderunnerbot's People

Contributors

zechcodes avatar aryan-debug avatar bensonchow123 avatar rosswf avatar musakhan16 avatar zenoix avatar hexspecter avatar dependabot[bot] 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.