Skip to content

The source for a Discord bot script that, while running, can take python code from within a Discord channel, execute it, and return the output back on the same channel.

Notifications You must be signed in to change notification settings

afk-echo/discord-py-interpreter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

discord-py-interpreter

The source for a Discord bot script that, while running, can take python code from within a Discord channel, execute it, and return the output back on the same channel.

Pre-requisites

  • A version of Python 3.x
  • discord.py - Easiest way to install is by running pip install discord in a terminal.
  • ConsoleToStr.py - Can be obtained from here.
  • A Discord Bot account - can be obtained from the Discord Developer Portal.

Usage

  1. Grab the latest source code archive(.zip) from here.
  2. Extract the file into a folder of your choice on your machine.
  3. Open main.py with a text editor and change the value of command_prefix to a prefix of your choice. (Default is p.)
  4. Scroll down to the bottom of main.py and change <ENTER TOKEN HERE> to your Bot's token.
  5. Save the changes and run main.py. (can be run by simply double clicking the file)

Commands

  1. run: Runs the code that is provided to the bot from a message. Usage of run:
<prefix>run ```python
<Enter code here>
```
  1. files: Returns all the files that are stored in the current working directory of the script. Usage of files:
<prefix>files
  1. remove: Removes a file from the current working directory of the script.
<prefix>remove <filename>

About

The source for a Discord bot script that, while running, can take python code from within a Discord channel, execute it, and return the output back on the same channel.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages