A Telegram bot that will run code for you.

piston_bot

A Telegram bot that will run code for you. Made using piston.

Available as @iruncode_bot on telegram.

Examples

Basic example

  • Input:

    /run python3
    print('Hi')
    for i in range(5):
        print(i)
  • Response:

    Language:

    python3

    Code:

    print('Hi')
    for i in range(10):
        print(i)

    Output:

    Hi
    0
    1
    2
    3
    4

With user input

  • Input:

    /run py
    print(input())
    /stdin
    Hello
  • Response:

    Language:

    py

    Code:

    print(input())

    Output:

    Hello

Deploy your own

You'll need go installed.

  • Create a telegram bot, and copy its token.

  • Run the following in your terminal:

    go build ./cmd/bot
    
    export TOKEN=<your telegram bot token>
    ./bot         # starts the bot

Contribution

Contributions are welcome! You're free to create a Pull Request for potential improvements to the bot.

Possible contributions:

  • Automated API Tests
  • Documentation, Code comments, Code cleanup, etc.
Owner
Tushar Sadhwani
Contact: [email protected] • telegram: @tusharsadhwani • instagram: @sadhlife
Tushar Sadhwani
Similar Resources

IRC, Slack, Telegram and RocketChat bot written in go

IRC, Slack, Telegram and RocketChat bot written in go

go-bot IRC, Slack & Telegram bot written in Go using go-ircevent for IRC connectivity, nlopes/slack for Slack and Syfaro/telegram-bot-api for Telegram

Dec 20, 2022

Golang telegram bot API wrapper, session-based router and middleware

go-tgbot Pure Golang telegram bot API wrapper generated from swagger definition, session-based routing and middlewares. Usage benefits No need to lear

Nov 16, 2022

Telegram Bot Framework for Go

Margelet Telegram Bot Framework for Go is based on telegram-bot-api It uses Redis to store it's states, configs and so on. Any low-level interactions

Dec 22, 2022

Client lib for Telegram bot api

Micha Client lib for Telegram bot api. Supports Bot API v2.3.1 (of 4th Dec 2016). Simple echo bot example: package main import ( "log" "git

Nov 10, 2022

Go library for Telegram Bot API

Go library for Telegram Bot API

tbot - Telegram Bot Server Features Full Telegram Bot API 4.7 support Zero dependency Type-safe API client with functional options Capture messages by

Nov 30, 2022

Telebot is a Telegram bot framework in Go.

Telebot "I never knew creating Telegram bots could be so sexy!" go get -u gopkg.in/tucnak/telebot.v2 Overview Getting Started Poller Commands Files Se

Dec 30, 2022

Golang bindings for the Telegram Bot API

Golang bindings for the Telegram Bot API All methods are fairly self explanatory, and reading the godoc page should explain everything. If something i

Jan 6, 2023

Golang Based Account Generator Telegram Bot

Account Generator Bot Account Generator Bot, written in GoLang via gotgbot library. Variables Env Vars - BOT_TOKEN - Get it from @BotFather CHANNEL_ID

Nov 21, 2022

Bot that polls activity API for Github organisation and pushes updates to Telegram.

git-telegram-bot Telegram bot for notifying org events Requirements (for building) Go version 1.16.x Setup If you don't have a telegram bot token yet,

Apr 8, 2022
Comments
  • The bot fails to read the gcc compiling error and goes straight to running the output binary.

    The bot fails to read the gcc compiling error and goes straight to running the output binary.

    It returns the following output:

    Language:
    gcc
    
    Code:
    This should throw a compiler error
    
    Output:
    /piston/packages/gcc/10.2.0/run: line 6: ./a.out: No such file or directory
    

    When it should have returned something like:

    Language:
    gcc
    
    Code:
    This should throw a compiler error
    
    Output:
    main.cpp:1:1: error: ‘This’ does not name a type
     This should throw a compiler error
    

    I'm guessing it does this with any other compilable languages?

  • Conversation mode

    Conversation mode

    • simply typing /run language should make the bot ask you about the rest of the info, before running it
    • editing the original code message should edit the response with new output
    • add stdin and commandline args support to this as well
Pro-bot - A telegram bot to play around with the community telegram channels

pro-bot ?? Pro Bot A Telegram Bot to Play Around With The Community Telegram Cha

Jan 24, 2022
A Telegram bot that asks you a question and evaluate the response you provide.
A Telegram bot that asks you a question and evaluate the response you provide.

PiSquared A Telegram bot that asks you a question and evaluate the response you provide. Thanks to the labse_bert model, the evaluation of the answer

Nov 13, 2022
A bot based on Telegram Bot API written in Golang allows users to download public Instagram photos, videos, and albums without receiving the user's credentials.

InstagramRobot InstagramRobot is a bot based on Telegram Bot API written in Golang that allows users to download public Instagram photos, videos, and

Dec 16, 2021
Bot - Telegram Music Bot in Go

Telegram Music Bot in Go An example bot using gotgcalls. Setup Install the serve

Jun 28, 2022
RaspChecker - A Telegram bot that allows you to monitor your Raspberry Pi's temperature and shut it down. Written in Golang.

RaspChecker Remotely monitor your Raspberry Pi's temperature and shut it down if you want. All through Telegram. How to set up In order to run the bot

Jan 2, 2022
A Telegram bot that feeds you every hour with the latest news about Hacking, FOSS, privacy, security, etc

HackerNews Telegram bot - Golang version A Telegram bot that serves you with personalized HackerNews articles. You can self host it and make it filter

Feb 1, 2022
This repository will guide you to steal whatever the user copies and send content to telegram bot.

copy-clipboard-stealer-with-telegram This repository will guide you to steal whatever the user copies and send content to telegram bot. Setting Envior

Oct 4, 2022
UcodeQrTelebot ver2 - Easy way to get QR and U-code using Utopia API in telegram bot
UcodeQrTelebot ver2 - Easy way to get QR and U-code using Utopia API in telegram bot

UcodeQrTelebot Easy way to get QR and U-code using Utopia API in telegram bot Us

Dec 30, 2021
Bot-template - A simple bot template for creating a bot which includes a config, postgresql database

bot-template This is a simple bot template for creating a bot which includes a c

Sep 9, 2022
The serverless OTP telegram service use telegram as OTP service, and send OTP through webhook

Setup OTP First thing, you need prepare API(webhook) with POST method, the payload format as below { "first_name": "Nolan", "last_name": "Nguyen",

Jul 24, 2022