Asynchronous Python wrapper for BenBot API.
Project description
BenBotAsync
Python wrapper for the BenBot API.
Installing:
Synchronous: Deprecated for now.
Windows: py -3 -m pip install BenBot
Linux/macOS: python3 -m pip install BenBot
Asynchronous:
Windows: py -3 -m pip install BenBotAsync
Linux/macOS: python3 -m pip install BenBotAsync
Examples:
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())
loop.close()
This would output:
CID_029_Athena_Commando_F_Halloween
fortnitepy example:
import fortnitepy
import BenBotAsync
client = fortnitepy.Client(
auth=fortnitepy.EmailAndPasswordAuth(
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 = 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.
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-2.3.0.tar.gz
(6.5 kB
view hashes)
Built Distribution
Close
Hashes for BenBotAsync-2.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d72b89a936f30caf9ec45c66580024a9cdd8720812190331b2c91edfd6881e13 |
|
MD5 | 86aad2224be9eaa16f252c00058bd269 |
|
BLAKE2b-256 | ede9e36958b2f8e145fc833c6933510149e3ef7239c84e2dc53df413985bc537 |