write bots for we.yarno — cards, inline forms, server-counted polls, live values, voice
Project description
yarno
write bots for we.yarno — the invite-only servers/channels/voice app.
pip install yarno
the shortest complete bot:
from yarno import Bot
bot = Bot() # reads $YARNO_TOKEN
@bot.command("hi", "says hi")
async def hi(ctx):
return f"hi {ctx.username}"
bot.run()
no intents, no command tree, no sync() step, no 3-second deadline. your bot
holds a live socket to the instance, so the decorator is the registration
and a handler can take as long as it needs.
what you get
- cards — compose rows, columns, progress bars, images, buttons instead of filling in an embed
- inline forms —
ui.input/ui.select/ui.toggle/ui.sliderlive in the card, in the channel; any click submits the whole form asctx.values. no modals. - polls that outlive you —
ui.button(collect="v:yes")is counted by the server, so votes land while your process is down; read them back withbot.tallies() - live values —
ui.ticker/ui.bar(rate=...)/ui.slider(rate=...)advance on every viewer's screen; you push state changes, not frames. a seek bar that tracks the playhead is one component. - docked cards — pin one card above the channel's scroll (now playing, scoreboards, countdowns)
- autocomplete — suggest argument values as someone types, over your already-open socket
- dms, files, reactions, avatars, voice —
@bot.on_message,send(files=[...]),bot.react(),bot.set_avatar(), andbot.voice_join()with theyarno[voice]extra — music-grade stereo opus, andplay()takes seek / ffmpeg filters / auth headers and reports the audio it actually delivered, so a real dj bot is yt-dlp + ffmpeg away - buttons that survive restarts — per-message state lives on the server and rides back with every click
privacy, stated up front
a bot sees nothing by default: commands aimed at it, clicks on its own cards, and dms it's part of. it does not receive channel messages, and there is no intent to flip on. the read apis hold the same line.
docs
- quickstart — token to working command in about two minutes
- cards & components
- the full sdk reference
- wire protocol — for writing a bot in another language
examples live in examples/: pingpong.py is the core loop,
lunchbot.py is forms + polls + autocomplete + a docked countdown.
tokens come from the dev console. we.yarno is invite-only; the sdk is public so bots can be written for it.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file yarno-0.3.0.tar.gz.
File metadata
- Download URL: yarno-0.3.0.tar.gz
- Upload date:
- Size: 18.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bb9ed480cec552424ae93dd46cc4f9126fbcc88ba0b5e82c92f13274e041849d
|
|
| MD5 |
49469360bbd1d82d6a9be37af6e683c5
|
|
| BLAKE2b-256 |
1cd011a15699d23622523a3853d9037690ed9d75e9d8781f7dd7d7406f1b1080
|
Provenance
The following attestation bundles were made for yarno-0.3.0.tar.gz:
Publisher:
publish.yml on alfaoz/yarno-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yarno-0.3.0.tar.gz -
Subject digest:
bb9ed480cec552424ae93dd46cc4f9126fbcc88ba0b5e82c92f13274e041849d - Sigstore transparency entry: 2258033595
- Sigstore integration time:
-
Permalink:
alfaoz/yarno-sdk@00cdded13a2722732e636be004bd9ae50d43d011 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/alfaoz
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@00cdded13a2722732e636be004bd9ae50d43d011 -
Trigger Event:
push
-
Statement type:
File details
Details for the file yarno-0.3.0-py3-none-any.whl.
File metadata
- Download URL: yarno-0.3.0-py3-none-any.whl
- Upload date:
- Size: 18.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b78f8bcf782b1e560b244fee58a03cef82f3ff3fbb8cc888e8546b5564392af9
|
|
| MD5 |
c50868ecf63058f2c532bc4960743f82
|
|
| BLAKE2b-256 |
0075f9b65ca7c6575db3112be4ab4795bd466c3cc6a602cf77cfdf6472082dd6
|
Provenance
The following attestation bundles were made for yarno-0.3.0-py3-none-any.whl:
Publisher:
publish.yml on alfaoz/yarno-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yarno-0.3.0-py3-none-any.whl -
Subject digest:
b78f8bcf782b1e560b244fee58a03cef82f3ff3fbb8cc888e8546b5564392af9 - Sigstore transparency entry: 2258033822
- Sigstore integration time:
-
Permalink:
alfaoz/yarno-sdk@00cdded13a2722732e636be004bd9ae50d43d011 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/alfaoz
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@00cdded13a2722732e636be004bd9ae50d43d011 -
Trigger Event:
push
-
Statement type: