4.4.2 • Published 3 months ago

iocompiler v4.4.2

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
3 months ago

Realtime Input/Output Compilers

by @PanditSiddharth

How to Setup

  1. Go to @BotFather on Telegram.
  2. Send the command /newbot to create a new bot.
  3. Follow the instructions to name your bot and create a username.
    • Send Name of your bot.
    • Now it will ask you to give username for your bot.
      • Username should endswith "bot" text and unique.
      • for example: sidkacompiler12bot .

You will receive a bot token and a bot link after completing these steps.

Main Setup Process

  • Go to fdroid website and Download latest version of Termux.
  • In termux Run these bellow written commands.
curl -O https://api.ignoux.in/iocompiler/termux.sh

chmod +x termux.sh

bash termux.sh

cd ~/compiler

node index.js
  • Follow each instructions of said by installer.
  • That's it your bot is running on termux. !Enjoy.
  • It will show you in red color warning ignore it your bot is runnig now.
  • Node.js installed on your system.
  • Optional: Install additional languages like C/C++, Python, Java, etc.
  1. Open PowerShell, Command Prompt, or your terminal.
  2. Create and navigate to a new directory for your project:

    mkdir compiler
    cd compiler
  3. Initialize a new Node.js project and install IOCompiler:

    npm init -y
    npm install iocompiler
  4. Create an index.js file and paste the following code. Replace process.env.BOT_TOKEN with your bot token from BotFather, and process.env.TELEGRAM_ID with your Telegram ID:

    ```js
    const { compiler } = require('iocompiler');
    
    // Specify allowed users; without this, all users can access your bot
    const { bot } = compiler(process.env.BOT_TOKEN, { allowed: [1791106582, process.env.TELEGRAM_ID] });
    
    // Launching telegraf bot in polling mode
    bot.launch({ dropPendingUpdates: true });
    ```

    For Developers for using this lib in those work:

let { compiler } = require('iocompiler');
let { Telegraf } = require("telegraf")

let bot = new Telegraf(process.env.BOT_TOKEN)

bot.on("message", (ctx, next) => {
  ctx.reply("I Got your message processing...")

    // Change incomming message for compilation
    ctx.update.message.text = "/js console.log('lol')"

    // Give update to next handler with updated text
    next(ctx)
})

  /*
  * ttl: max time to execute code, default 60 seconds
  * allowed: array of telegram ids of users who can execute code on it
  */
// allowed users id if you not give this then all users can use your bot
compiler(bot, { ttl: 60, allowed: [1791106582]});

// launching telegraf bot in polling mode
bot.launch({ dropPendingUpdates: true });
  1. Run the project:
    node index.js

That's it! You have successfully created your Telegram bot using IOCompiler.


Useful Commands

  • See all commands: /help
  • Check if bot is running: /ping
  • See current version and features of the bot: /version

For any queries, join our support groups:


GitHub: IOCompiler Repository
NPM: IOCompiler on NPM

For any other help:

Testing Group: IO_Coding
Contribute to the project or create your own bot—it's open source!

⚠️ Please run only in a secure environment

Using your bot, users can potentially harm your system. Utilize Docker or any secure environment, or specify allowed users via Telegram ID.


3.2.2-alpha

4 months ago

3.2.2

4 months ago

3.1.3

4 months ago

3.2.1

4 months ago

3.2.0

4 months ago

3.1.4

4 months ago

4.4.1

3 months ago

4.4.0-alpha

3 months ago

4.4.0

3 months ago

4.3.1

4 months ago

4.4.2

3 months ago

4.1.0

4 months ago

4.0.1

4 months ago

4.0.0

4 months ago

4.3.0

4 months ago

4.2.1

4 months ago

3.1.2

9 months ago

3.1.1

9 months ago

3.1.0

9 months ago

3.0.0

10 months ago

2.0.3

10 months ago

2.0.2

10 months ago

2.0.5

10 months ago

2.0.4

10 months ago

2.0.7

10 months ago

2.0.6

10 months ago

2.0.1

10 months ago

2.0.0

10 months ago

1.3.1

1 year ago

1.1.0

1 year ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago