Library SDK

Librairies clients

Un seul fichier par langage : User · Bot · EmbedBuilder · ActionRow / Button / WebAction (tous langages). BobCord API : …

Token BobCord = 24 caractères depuis /applications → Voir token. Auth : Authorization: Bearer <token>. Même API REST pour tous les SDKs (py/js/ts + rust/cs/go/dart/swift/fs/kt/java/php).

Python

3.9+ · requests + websocket-client

pip install requests websocket-client
from bobcord_lib import Bot, EmbedBuilder, ActionRow, Button, WebAction
  • User(token) · selfbot
  • Bot(token) · @bot.command / @bot.event
  • EmbedBuilder() · Builder()
  • ActionRow · Button · WebAction · selects

JavaScript vanilla

Navigateur / Node 18+ (fetch natif)

import { Bot, EmbedBuilder } from './bobcord.js'
  • new User(token) · selfbot
  • new Bot(token) · .command() / .event()
  • new EmbedBuilder() · new Builder()
  • ActionRow · Button · WebAction · selects

TypeScript

Bun ou Node (tsx)

bun run bobcord.ts
# ou: npx tsx bobcord.ts
  • mêmes classes, typées
  • Context · Author · BobEvent
  • ActionRow · Button · WebAction

Rust

tokio + reqwest + serde_json

let bot = Bot::new("TOKEN");
bot.send("salut", "général", None).await?;
  • Bot::new(token) · login / send
  • EmbedBuilder · ActionRow · Button · WebAction

C#

.NET 6+ · HttpClient + System.Text.Json

var bot = new Bot("TOKEN");
await bot.SendAsync("salut", actionRows: new[]{ row });
  • new Bot(token) · SendAsync / LoginAsync
  • EmbedBuilder · ActionRow · Button · WebAction

Go

stdlib net/http + encoding/json

bot := NewBot("TOKEN")
bot.Send("salut", "général", &SendOpts{ActionRows: rows})
  • NewBot(token) · Send / Login
  • ActionRow · ButtonWebAction · WebActionConfirm

Dart

http package

final bot = Bot('TOKEN');
await bot.send('salut', actionRows: rows);
  • command / event / start
  • EmbedBuilder().title().build()
  • ActionRow · Button · WebAction · selects

Swift

URLSession (REST)

let bot = Bot("TOKEN")
bot.send("salut", actionRows: rows) { _ in }
  • command / event / start
  • EmbedBuilder().title().build()
  • ActionRow · Button · WebAction · selects

F#

.NET · HttpClient + System.Text.Json

let bot = Bot()
bot.Login("TOKEN")
bot.Start().Wait()
  • Command / Event / Start
  • EmbedBuilder().Title(...).Build()
  • ActionRow · Button · WebAction · selects

Kotlin

OkHttp + org.json (REST)

val bot = Bot()
bot.login("TOKEN")
bot.start()
  • command / event / start
  • EmbedBuilder().title().build()
  • ActionRow · Button · WebAction · selects

Java

HttpClient + org.json (REST)

Bot bot = new Bot();
bot.login("TOKEN");
bot.start();
  • command / event / start
  • new EmbedBuilder().title().build()
  • ActionRow · Button · WebAction · selects

PHP

PHP 8+ · stream_socket (WS maison)

$bot = new Bot();
$bot->login('TOKEN');
$bot->start();
  • command / event / start
  • (new EmbedBuilder())->title()->build()
  • ActionRow · Button · WebAction · selects

Surface API

User / Bot
  login()  send()  edit()  delete()  react()  getMessage()  getUser()  run()/start()

Bot only
  @bot.event / bot.event()     → ready, message, …
  @bot.command / bot.command() → !ping etc.

EmbedBuilder().title().description().color().field().footer().build()
Builder().set(k, v).build()   → dict générique

Bibliothèques multi-langages (generate_libs)

User + Bot (BobCord API v1.1) + EmbedBuilder + ActionRow/Button/WebAction — téléchargement direct.

Rust — bobcord_rust.rs

Télécharger bobcord_rust.rs

C# — bobcord_cs.cs

Télécharger bobcord_cs.cs

Go — bobcord_go.go

Télécharger bobcord_go.go

Dart — bobcord_dart.dart

Télécharger bobcord_dart.dart

Swift — bobcord_swift.swift

Télécharger bobcord_swift.swift

F# — bobcord_fs.fs

Télécharger bobcord_fs.fs

Kotlin — bobcord_kt.kt

Télécharger bobcord_kt.kt

Java — bobcord_java.java

Télécharger bobcord_java.java

PHP — bobcord_php.php

Télécharger bobcord_php.php