Documentation API
SDKRuntime API v1Multi-langages

Méthodes & endpoints

Méthodes des SDK et endpoints Runtime API.

JavaScript · Python · Go · Rust · C · curl Clé masquée, retries bornés

Endpoints

MéthodeEndpointRôle
POST/api/v1/me/runtime/statsStats + heartbeat + shards.
POST/api/v1/me/runtime/heartbeatHeartbeat seul.
POST/api/v1/me/runtime/commandsCommandes slash globales.
POST/api/v1/me/runtime/profileNom, avatar, bannière.
GET/api/v1/me/runtimeÉtat live, source et vérification Discord.

JavaScript

MéthodeRetourDescription
postStats(stats?)Promise<StatsData>Envoie immédiatement les statistiques.
postHeartbeat()Promise<HeartbeatData>Signal de vie sans modifier les compteurs.
postCommands(commands?)Promise<CommandsData>Envoie les commandes globales.
postProfile(profile?)Promise<ProfileData>Envoie le profil.
start()thisDémarre la boucle automatique.
stop()thisArrête la boucle.
setStatsProvider(fn)thisFournit les compteurs à chaque tick.
attachDiscord(client)thisBranche un client discord.js.

Python

MéthodeDescription
post_stats(...)Envoie les statistiques.
post_heartbeat()Signal de vie.
post_commands(commands)Envoie les commandes.
post_profile(...)Envoie le profil.
set_stats_provider(fn)Fonction appelée à chaque tick.
start() / stop()Démarre/arrête le thread.

Corps des requêtes

EndpointCorps
/statsserver_count ou guild_count, shard_count, shards, user_count
/heartbeat{}
/commands{ "commands": [...] }
/profile{ name?, avatar_url?, banner_url? }

Une question ? Le support Discord est ouvert.