A Tetris bot capable of automatically playing custom multiplayer matches in TETR.IO. It uses a modified version of ElTetris to analyze the current board for optimal moves and the @haelp/teto library to interact with main game API.
This project can be a good starting point to start developing tetrio bots.
- Install dependencies.
pnpm i
- Create
.env
file and add yourTETRIO_TOKEN
orTETRIO_USERNAME
,TETRIO_PASSWORD
secrets.
# .env
TETRIO_TOKEN = "your_tetrio_bot_token"
# or
TETRIO_USERNAME = "your_tetrio_username"
TETRIO_PASSWORD = "your_tetrio_password"
- Start the bot
pnpm start
- If the login is successful, the bot will create a custom private room with autostart settings, and the room code will be logged to the console like
Joined room: ABCD
.
You must use an account that has been approved as a bot account, otherwise you risk being banned. Contact TETR.IO Support to request a bot account.
The bot is the one on the right side.