Benji API - Quartonos/Bernu GitHub Wiki

Benji API coming for Bernu Build 4

Fetching the version of Bernu

import benji
version = benji.wv()
if version == "VerB4":
   print("The program should run")

Do you see that? Programs that may be running on Bernu can now see what Builds they are on! That is all part of the Benji API.

Let's do a simple code of detecting if the program is running on a fork of Bernu:

import benji
version = benji.wv()
if version == "ForkB3":
   print("The program should run")
else:
   print("Program cannot run in another version of Bernu. And it will close.")
   break

Or you can just give a warning and still let the program run:

import benji
version = benji.wv()
if version == "ForkB3":
   print("The program should run")
   program()
else:
   print("Program may not run in this version of Bernu. But it still has compatibility. Problems may appear")
   program()