Skip to main content

AiotraQ-Bot

Async ready traQ Bot library written in Python.

PyPI - Version GitHub license CI

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.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 aiotraq-bot 0.3.0
File Size Uploaded Provenance Actions
aiotraq_bot-0.3.0.tar.gz 9.2 kB With provenance Details for aiotraq_bot-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for aiotraq-bot 0.3.0
File Interpreter ABI Platform Actions
aiotraq_bot-0.3.0-py3-none-any.whl Python 3 none any Details for aiotraq_bot-0.3.0-py3-none-any.whl

Total release size: 19.6 kB

Release files / aiotraq_bot-0.3.0.tar.gz

Download URL aiotraq_bot-0.3.0.tar.gz
Size 9.2 kB
Tags Source
SHA-256 checksum
How to use checksums
3604750b7f9bcf7e5b35cc5a4a38df5fb9f80a5d9833ce5037f81808946ae39e
BLAKE2b-256 checksum
How to use checksums
c24e14cab08372e10f586647f598ec2fb8d11fdf189d0b2315d8bee92dee8334
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 17, 2026.

Transparency log

Release files / aiotraq_bot-0.3.0-py3-none-any.whl

Download URL aiotraq_bot-0.3.0-py3-none-any.whl
Size 10.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7def54ffd5638b7456f053223ae2f75e07467d4df2965b98a096a75c877b1f5a
BLAKE2b-256 checksum
How to use checksums
70130b80694893f0e205d915e961b43fb01b51996b6459eda5f3df5b0ca3fae4
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 17, 2026.

Transparency log

Security for aiotraq-bot 0.3.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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for aiotraq_bot-0.3.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 Nov 17, 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.

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