Coder Social home page Coder Social logo

snowmead / code-execute Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 0.0 72 KB

Discord bot that executes code blocks from a discord message, gists or files

Go 48.05% Dockerfile 1.14% Makefile 1.02% Smarty 12.81% HCL 36.98%
discord-bot golang-application terraform gke-cluster helm-chart

code-execute's Introduction

CodeExecute

CodeExecute is a discord bot that enables developer collaboration through discord messages. It will allow developers to interactively execute code through discord messages while sharing and previewing the output of the code execution.

Based on Piston

This bot executes code using the Piston library which includes sandboxing and added security. You can read up on their level of security, supported languages and more:

How to use

Syntax

Basic code block execution syntax
run```[language]
<your code>
```
The bot also supports messages with text before and after your code block.
Hello! Can anyone help me with this code
run```go
package main
import "fmt"
func main() {
  fmt.Printf("Hello world")
}
```
Thanks in advance!
Execute a github gist
run https://gist.github.com/michaelassaf/29a8eb718842c1cb91718e91b53fe200
Execute a file attached to your message
run file

The discord bot will return a reply message with the output of the code and with a Run button that allows the user to execute their code as many times as they wish. This gives the user the possibility to modify their code and re-execute their code.

Alt Text

code-execute's People

Contributors

snowmead avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

code-execute's Issues

issue

Cool i guess but cant u just make a request and get the ip of the host

"Run" button returns error "This interaction failed"

When clicking on the Run button, the output of the code that was executed is updated in the message but the button is still waiting for a response, almost as though it hasn't received an ACK.

Must modify the reExec function handler to return an ACK.

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.