Asynchronous Python wrapper for BenBot API.
Project description
BenBot
Python wrapper for BenBot.
Installing:
Synchronous:
Windows: py -3 -m pip install BenBot
Linux/macOS: python3 -m pip install BenBot
Asynchronous:
Windows: py -3 -m pip install AsyncBenBot
Linux/macOS: python3 -m pip install AsyncBenBot
Examples:
import BenBotAsync
import asyncio
async def ben_search():
result = await BenBotAsync.get_cosmetic(
"Ghoul Trooper",
params=BenBotAsync.Tags.NAME,
check=(BenBotAsync.Filters.TYPE, 'Outfit')
)
print(result.id)
loop = asyncio.get_event_loop()
loop.run_until_complete(ben_search())
loop.close()
This would output:
CID_029_Athena_Commando_F_Halloween
fortnitepy example:
import fortnitepy
import BenBotAsync
client = fortnitepy.Client(
email='example@email.com',
password='password123'
)
@client.event
async def event_friend_message(message):
args = message.content.split()
split = args[1:]
content = " ".join(split)
if args[0] == '!skin':
skin = result = await BenBotAsync.get_cosmetic(
content,
params=BenBotAsync.Tags.NAME,
check=(BenBotAsync.Filters.TYPE, 'Outfit')
)
await client.user.party.me.set_outfit(asset=skin.id)
client.run()
The list of functions is on the Wiki.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
BenBotAsync-1.3.1.tar.gz
(4.8 kB
view hashes)
Built Distribution
Close
Hashes for BenBotAsync-1.3.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | abb3e4799592f0c232ebd24448c2c6af57c5a72d5053e927ed84664d1987c1a8 |
|
MD5 | 6ece5a53316ac0f58f86e76616cd2596 |
|
BLAKE2b-256 | 112fb6bde24d1ef64c3cfbb74bf773ae7ed4fc19572da51630ca0715c5b04053 |