Python wrapper for the BenBot API.
On the 30th of July 2022, the Ben Bot API shut down, with this message from the developer, FabianFG;
It was an honor to help so many people with an idea that initially seemed nearly impossible to realize but turned into something pretty cool. Now I just don't feel like I have the time or dedication to continue properly supporting it so this will be the official end of BenBot.
Therefore with BenBot shutting down, this wrapper is now useless. Now, an alternative I would recommend is Fortnite-API which has almost all of the features that BenBot had. I have made a wrapper for this API as well with similar functions, the name of that package is FortniteAPIAsync (https://pypi.org/project/FortniteAPIAsync/).
Windows: py -3 -m pip install BenBot
Linux/macOS: python3 -m pip install BenBot
Windows: py -3 -m pip install BenBotAsync
Linux/macOS: python3 -m pip install BenBotAsync
import BenBotAsync
import asyncio
async def ben_search():
result = await BenBotAsync.get_cosmetic(
lang="en",
searchLang="en",
matchMethod="full",
name="Ghoul Trooper"
)
print(result.id)
loop = asyncio.get_event_loop()
loop.run_until_complete(ben_search())
This would output:
CID_029_Athena_Commando_F_Halloween
fortnitepy example:
import fortnitepy
import BenBotAsync
client = fortnitepy.Client(
auth=fortnitepy.EmailAndPasswordAuth(
email='[email protected]',
password='password123'
)
)
@client.event
async def event_friend_message(message: fortnitepy.FriendMessage) -> None:
args = message.content.split()
split = args[1:]
content = " ".join(split)
if args[0] == '!skin':
skin = await BenBotAsync.get_cosmetic(
lang="en",
searchLang="en",
matchMethod="contains",
name=content,
backendType="AthenaCharacter"
)
await client.user.party.me.set_outfit(asset=skin.id)
client.run()
You can check out the documentation for BenBotAsync here.