interactions.py adapter for Mochi - auto-instruments commands, guild joins/leaves, and health snapshots
Project description
mochi-analytics-interactions
interactions.py adapter for Mochi analytics.
Install
pip install mochi-analytics mochi-analytics-interactions discord-py-interactions
Usage
import interactions
from mochi_analytics import MochiClient
from mochi_analytics_interactions import attach_mochi
mochi = MochiClient(url="https://mochi.example.com", api_key="mochi_sk_...")
client = interactions.Client()
detach = attach_mochi(client, mochi)
client.start("...")
Commands are recorded on CommandCompletion, which interactions.py dispatches
in a finally — so it fires for failures too, and a preceding CommandError is
what marks an invocation unsuccessful. Neither event reports how long the
command took, so durationMs is omitted unless you pass
auto_track_commands=False and wrap your callbacks with wrap_command.
An AutoShardedClient sends one snapshot per shard, each carrying that shard's
own guild count.
See the interactions.py guide for the full documentation.
License
Apache-2.0
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 mochi_analytics_interactions-0.2.0.tar.gz.
File metadata
- Download URL: mochi_analytics_interactions-0.2.0.tar.gz
- Upload date:
- Size: 11.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
caaabc6284013a3ec50710f7fc1b7059baf7e75dc31b315a5e01736cb05b4aaf
|
|
| MD5 |
024db04341722f8fdd487fc1f09af26e
|
|
| BLAKE2b-256 |
50fa97501d77c9ee0ead497459ce7df25a239eaa8923ef9f5d07a1aca4aeaeda
|
Provenance
The following attestation bundles were made for mochi_analytics_interactions-0.2.0.tar.gz:
Publisher:
release-please.yml on mochi-analytics/mochi-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mochi_analytics_interactions-0.2.0.tar.gz -
Subject digest:
caaabc6284013a3ec50710f7fc1b7059baf7e75dc31b315a5e01736cb05b4aaf - Sigstore transparency entry: 2134605179
- Sigstore integration time:
-
Permalink:
mochi-analytics/mochi-py@ede77c4e5589d887cd5a2d75c7a35096e295b5b9 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/mochi-analytics
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-please.yml@ede77c4e5589d887cd5a2d75c7a35096e295b5b9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file mochi_analytics_interactions-0.2.0-py3-none-any.whl.
File metadata
- Download URL: mochi_analytics_interactions-0.2.0-py3-none-any.whl
- Upload date:
- Size: 9.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e8206ce7584bbd2c15057c7376cfa3511439b963f2990cb904b80284993abfb
|
|
| MD5 |
9a747269c8bb5afc30964fa94526b970
|
|
| BLAKE2b-256 |
d158e20b607d798666839fbe2979640511fe47544800662b16cb24efc56ba65d
|
Provenance
The following attestation bundles were made for mochi_analytics_interactions-0.2.0-py3-none-any.whl:
Publisher:
release-please.yml on mochi-analytics/mochi-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mochi_analytics_interactions-0.2.0-py3-none-any.whl -
Subject digest:
9e8206ce7584bbd2c15057c7376cfa3511439b963f2990cb904b80284993abfb - Sigstore transparency entry: 2134605226
- Sigstore integration time:
-
Permalink:
mochi-analytics/mochi-py@ede77c4e5589d887cd5a2d75c7a35096e295b5b9 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/mochi-analytics
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-please.yml@ede77c4e5589d887cd5a2d75c7a35096e295b5b9 -
Trigger Event:
push
-
Statement type: