AiotraQ-Bot
Async ready traQ Bot library written in Python.
Requirements
AiotraQ-Bot は以下のライブラリを使用しています。
Installation
pip install aiotraq-bot
Usage
TraqHttpBot を使って http bot を作成することができます。
traQ->BOTサーバーへのイベント受け取り部分を補助します。
BOTサーバー->traQへのイベント送信は AiotraQ、AiotraQ-Message 等を利用してください。
import os
from aiotraq_bot import TraqHttpBot
bot = TraqHttpBot(verification_token=os.getenv("BOT_VERIFICATION_TOKEN"))
@bot.event()
async def on_message(payload: MessageCreatedPayload):
print(payload)
if __name__ == "__main__":
bot.run()
Event handler の登録
イベントの登録は @bot.event() デコレータを使って行うことができます。
event の引数として対象のイベントを指定するか、関数の型ヒントを使って指定することができます。
MESSAGE_CREATED イベントを型ヒントを使って指定する場合
@bot.event()
async def on_message(payload: MessageCreatedPayload):
print(payload)
MESSAGE_CREATEDイベントを引数を用いて指定する場合
@bot.event("MESSAGE_CREATED")
async def on_message(payload):
print(payload)
詳細は ドキュメント|Bot サーバーの作成を参照してください。
Acknowledgements
This project is inspired by python-traq-bot.
License
This project is licensed under the terms of the MIT license.
Metadata
Release files for aiotraq-bot 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| aiotraq_bot-0.3.1.tar.gz | 9.3 kB | With provenance | Details for aiotraq_bot-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aiotraq_bot-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for aiotraq_bot-0.3.1-py3-none-any.whl |
Total release size: 19.9 kB
Release files / aiotraq_bot-0.3.1.tar.gz
| Download URL | aiotraq_bot-0.3.1.tar.gz |
|---|---|
| Size | 9.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c11a484eac13e814dea8c6188dc5cff3125ba47fef1a80926d36b6ea2689324f
|
|
BLAKE2b-256 checksum How to use checksums |
e4e2893e9af3d4359954695d38697432097aa1cff211807cf925bfd55e8d09d9
|
| 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 Nov 30, 2026.
Transparency logRelease files / aiotraq_bot-0.3.1-py3-none-any.whl
| Download URL | aiotraq_bot-0.3.1-py3-none-any.whl |
|---|---|
| Size | 10.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
10b0f0bcb25f4af149b5a325a38b77ceb4801a4ab3695ab1c193edc4d25bc30e
|
|
BLAKE2b-256 checksum How to use checksums |
ec825cb4fbaa2425f821535a99e9fc7a73be235805696127fc6dee5e519dbc3e
|
| 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 Nov 30, 2026.
Transparency logSecurity for aiotraq-bot 0.3.1
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
Both files in this release have been uploaded with provenance metadata.
Attestation for aiotraq_bot-0.3.1.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 Nov 30, 2026.
Transparency logA 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.