{"id":20313499,"url":"https://github.com/engineer-man/piston-bot","last_synced_at":"2025-04-06T01:10:50.330Z","repository":{"id":41872167,"uuid":"278465283","full_name":"engineer-man/piston-bot","owner":"engineer-man","description":"I Run Code bot on Discord","archived":false,"fork":false,"pushed_at":"2024-08-18T14:51:36.000Z","size":154,"stargazers_count":247,"open_issues_count":6,"forks_count":39,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-03-30T00:07:48.479Z","etag":null,"topics":["hacktoberfest"],"latest_commit_sha":null,"homepage":"https://emkc.org/run","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/engineer-man.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-09T20:34:47.000Z","updated_at":"2025-03-23T20:13:00.000Z","dependencies_parsed_at":"2024-04-09T08:47:34.418Z","dependency_job_id":"ff0eb77a-e36e-4fbb-afe9-cb176388ad9d","html_url":"https://github.com/engineer-man/piston-bot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/engineer-man%2Fpiston-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/engineer-man%2Fpiston-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/engineer-man%2Fpiston-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/engineer-man%2Fpiston-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/engineer-man","download_url":"https://codeload.github.com/engineer-man/piston-bot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247419861,"owners_count":20936012,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest"],"created_at":"2024-11-14T18:11:20.908Z","updated_at":"2025-04-06T01:10:50.304Z","avatar_url":"https://github.com/engineer-man.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Important Change/Update (May 2022)\n**Discord changed their client to prevent sending messages\nthat are preceeded by a slash (/)\nTo run code you can use `\"./run\"` or `\" /run\"` until further notice**\n\n# I Run Code\nSource code for the \"I Run Code\" Discord Bot used to run code snippets inside Discord chats.\n\n![helloworld picture](helloworld.png)\n\nYou can add me to your server [here](https://emkc.org/run) \n\nTo see a list of supported languages click [here](https://github.com/engineer-man/piston#Supported-Languages)\n\nIf you have questions check by our [Discord Server](https://discord.com/invite/engineerman)\n\n[engineer-man/piston](https://github.com/engineer-man/piston) is the api that actually runs the code.\n\n# How to use\n## Basic Syntax\n\n````\n/run [language] (-\u003e [output syntax] (optional))\n[args (optional)]\n```[syntax]\n\u003cyour code\u003e\n```\n[stdin (optional)]\n````\n\n* You have to provide either `language` or `syntax`\n* You can provide command line arguments by specifying them before the codeblock\n* Each line corresponds to one argument\n* You can provide standard input by specifying it after the codeblock\n\n## Editing and deleting messages\n* You can edit your last `/run` message if you make a mistake and the bot will edit it's initial response.  \n* You can delete the last output message (that was caused by you) with `/delete` or `/del` or by deleting your most recent `/run` message\n\n## Use a source file instead of a codeblock\n\n````\n/run [language] (-\u003e [output syntax] (optional))\n[args1]\n[args2]\n\n[stdin1]\n[stdin2]\n\n\u003cattached_file\u003e\n```` \n* You can attach a file with source code instead of providing a codeblock (Maximum file size is 65535 bytes)\n  * If you don't specify the language the bot will use the file extension \n  * You can specify command line arguments and stdin in the command. \n    * command line arguments should directly follow the `/run` line\n    * stdin is everything that follows after the first double newline\n* Please note that attachments can not be edited therefore you can not use the edit functionality if you provide a source file\n\n# Contributing\nIf you want to contribute you can just submit a pull request.\n### Code styling / IDE Settings\nPlease style your code according to these guidelines:\n* maximum line length is 99 columns \n* use 4 spaces for indentation\n* files end with a newline \n* lines should not have trailing whitespace\n\nIf you want to use an auto formatter please use `autopep8`\n\nExample config for VSCode:\n```\n\"[python]\": {\n    \"editor.rulers\": [\n        99\n    ],\n    \"editor.tabSize\": 4,\n},\n\"files.insertFinalNewline\": true,\n\"files.trimTrailingWhitespace\": true,\n\"editor.trimAutoWhitespace\": true,\n\"python.formatting.provider\": \"autopep8\",\n\"python.formatting.autopep8Args\": [\"--max-line-length\", \"99\"],\n```\n\n\n# What's new\n\n## 2021-09-26\nAdded `output syntax` functionality.  \n* The `/run` command will now take an additional output syntax highlighting code on the first line after a `-\u003e`\nFor example\n```\n/run cs -\u003e json\n```\nwill highlight the resulting output in discord as json.\n\n## 2020-11-29\nAdded `delete` functionality.  \n* The `/delete` or `/del` command will make the bot delete it's last output (that was caused by the caller)  \n* If you delete your most recent `/run` message the corresponding output will also be deleted.\n\n## 2020-08-04\nMade writing rust code \"snippets\" easier (Thanks https://github.com/UsairimIsani)\n```rust\nfn main() { }\n```\nwill be automatically created if it is not present in the provided code.\n\n## 2020-07-16\nMade writing java code \"snippets\" easier (Thanks https://github.com/Minecraftian14)\n\nWhen typing Java code the boilerplate code for `public class` will be added automatically.\n````java\n/run java\n```\nimport java.util.List;\nList.of(args).forEach(System.out::println);\n```\n````\nwill be interpreted as\n````java\n/run java\n```\nimport java.util.List;\npublic class temp extends Object {\n  public static void main(String[] args) {\n    List.of(args).forEach(System.out::println);\n  }\n}\n```\n````\n\n\n## 2020-07-15\nAdded optional command line parameters\nYou can use them by specifying them before the codeblock (1 per line)  \n\nExample:\n````\n/run \u003clanguage\u003e\nparameter 1\nparameter 2\n```\n\u003cyour code\u003e\n```\n````\n\n## 2021-02-05\nAdded optional standard input\nYou can use standard input by specifying it after the codeblock \n\nExample:\n````\n/run \u003clanguage\u003e\n```\n\u003cyour code\u003e\n```\nstandard input\n````\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fengineer-man%2Fpiston-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fengineer-man%2Fpiston-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fengineer-man%2Fpiston-bot/lists"}