Skip to main content

yapin.py

Unofficial Python library for building bots on Yapin'.

Install

pip install yapin.py

Quick start

import yapin

bot = yapin.Bot()  # reads YAPIN_BOT_TOKEN from .env or you can do yapin.bot(token="yb_")

@bot.command("ping", "Check if the bot is alive")
def ping(msg):
    msg.reply("pong")

@bot.on("member_join")
def welcome(ev):
    print(f"{ev.username} joined")

@bot.button("vote:")
def vote(i):
    i.ephemeral("You picked " + i.custom_id[5:])

bot.run()

Set YAPIN_BOT_TOKEN in your environment (token starts with yb_).

Main concepts

  • Commands: register slash/prefix commands with @bot.command(...).
  • Events: listen with @bot.on("event_name") or @bot.event.
  • Interactions: handle button clicks with @bot.button("prefix:").
  • Components: build rows/buttons with yapin.row(...), yapin.btn(...), and yapin.link_button(...).
  • Cogs/extensions: split features into classes/files using yapin.Cog, bot.add_cog(...), bot.load_extension(...), and bot.load_extensions(...).

Useful bot methods

  • Messaging: send, edit, delete, react
  • Interactions: respond
  • Server data: servers, server, channels, members, roles, user
  • Moderation: add_role, remove_role, kick, ban, unban, timeout
  • Presence/profile: set_status, set_profile

API reference

Use the official Yapin' developer docs for API payload details: https://www.yapin.gg/developers

Metadata

Release files for yapin.py 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for yapin.py 1.0.0
File Size Uploaded Provenance Actions
yapin_py-1.0.0.tar.gz 28.7 kB With provenance Details for yapin_py-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for yapin.py 1.0.0
File Interpreter ABI Platform Actions
yapin_py-1.0.0-py3-none-any.whl Python 3 none any Details for yapin_py-1.0.0-py3-none-any.whl

Total release size: 56.1 kB

Release files / yapin_py-1.0.0.tar.gz

Download URL yapin_py-1.0.0.tar.gz
Size 28.7 kB
Tags Source
SHA-256 checksum
How to use checksums
0f8837b162905c8baa395c29b64ea4abe0b85d68b6c2830325b5c016dea5cd24
BLAKE2b-256 checksum
How to use checksums
8d456509ddc9b16124938634c721078933f4bac917fcfd2cbe6c3bb5b038f873
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.

Transparency log

Release files / yapin_py-1.0.0-py3-none-any.whl

Download URL yapin_py-1.0.0-py3-none-any.whl
Size 27.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
825f787c1ccb25a4d829bf7bcb8f72c1b9aef21c6a707ba12fc8b0c42df91b1f
BLAKE2b-256 checksum
How to use checksums
8a468f8da4044d7f9faef2943430df43b92e81e635b41531f2a93935aac175ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.

Transparency log

Security for yapin.py 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for yapin_py-1.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page