How to make a BOT?
How to Make a BOT?
DISCLAIMER: The way in this blog has attribution under the Licensed Code. Attribution is Optional but you should attribute or at least MSG me that you made a BOT using my way. But If you don't I won't take any action :)
Here is a super easy way on Making a BOT! and can be done in just 6 Steps!
Main Engines: @Ar4Asd1-Bot and @Ar4Asd1-BOT-2
Community Made Enignes: @abotofabotofabot (Previously used the Engine now doesn't) @KnightsoftheGambit1, @KnightsoftheGambit2
Tutorial
This tutorial is on Github find it here. The Code is also over there.
Link
Step 1 - Make a Lichess Account
Create a Lichess Account on Lichess.org
Step 2 - Create a API
After creating an account go to https://lichess.org/account/oauth/token and select all options for the API. Copy your code and keep it safe. Do not share it.
Step 3 - upgrading to a BOT Account
You need to Open CMD or Windows Powershell and run this commad
curl -d '' lichess.org/api/bot/account/upgrade -H "Authorization: Bearer DeletethisandPasterYourAPITokenCodeHere"
Remeber to replace "DeletethisandPasterYourAPITokenCodeHere" with your API Token.
If CMD Replies with
ok}true
You have a BOT Account!
Step 4 - Installing
Install
Stockfish (Click More Options to see More Options for Windows Make sure to see if you can run the stockfish By Checking with a Programmer/AI)
https://stockfishchess.org/download/
For Stockfish I had installed one which my Laptop Couldn't work with so I had to install another I used POPCNT.
And you need to install python in Program Files in Your PC. Python 3.13.2 or Higher works
https://Python.org
Go to CMD Again and do
Pip Install Requests
pip install berserk python-chess
Step 5 - Modifying Code
Copy the file Code.py and change the code where you need to. (API, BOT Username, Stockfish Path)
Before doing this ask AI to run a saftey check on the code if you don't think the code is safe.
After replacing all the placeholders with your API, BOT Username and Stockfish Path, save the file as "LichessBOT.py"
Step 6 - Running
First open Lichess with your BOT account
Then Open CMD and run
Python LichessBOT.py
(If you named the file something else it wont work. Use LichessBOT.py or any name but add .py at the end. IF you added your own name then run that instead of LichessBOT.py)
This will run your BOT, you can now Challenge it, it will accept and play on Stockfish!
Thanks for Reading!
Hope you can make your own BOT. If you want to join a major BOT Tournament then read this Blog Below
Ar4Asd1_Chess's Blog • Another BOTs Allowed Team battle • lichess.org

