wolfapi
v9.1.2
Published
Vollständige WhatsApp Bot Library
Readme
WolfAPI
Vollständige WhatsApp Bot Library für Node.js. Unterstützt Messaging, Medienversand, Gruppenmanagement, Nachrichtenstatus und erweiterte Events.
Installation
npm install wolfapi
Verwendung
const WolfAPI = require("wolfapi") const bot = new WolfAPI()
bot.on("ready", () => { console.log("✅ WolfAPI ist bereit") })
bot.on("message", (msg) => { console.log("📩 Neue Nachricht:", msg) })
bot.on("status", (status) => { console.log("📊 Nachrichtenstatus:", status) })
bot.on("groupEvent", (event) => { console.log("👥 Gruppenereignis:", event) })
bot.connect() bot.handleCommands()
Funktionen
Nachrichten senden
bot.sendMessage("[email protected]", "Hallo Welt")
Medien senden
bot.sendMedia("[email protected]", "./bild.png", "image") bot.sendMedia("[email protected]", "./video.mp4", "video") bot.sendMedia("[email protected]", "./audio.mp3", "audio")
Gruppen verwalten
bot.createGroup("Meine Gruppe", ["[email protected]"]) bot.addParticipant("[email protected]", "[email protected]") bot.removeParticipant("[email protected]", "[email protected]") bot.leaveGroup("[email protected]")
Nachrichtenstatus abrufen
bot.getMessageStatus("message-id")
Befehle
bot.handleCommands("!") // Standardpräfix "!"
Unterstützte Standardbefehle:
!ping → antwortet mit Pong 🐺
!say → sendet den Text zurück
!sendimg → sendet ein Bild
!help → zeigt Befehle an
Events
ready → Bot ist verbunden und bereit
message → neue Nachricht empfangen
status → Nachrichtenstatus aktualisiert
groupEvent → Gruppenereignis (Teilnehmer hinzugefügt/entfernt, Gruppe erstellt, verlassen)
Abhängigkeiten
ws
qrcode-terminal
Lizenz
MIT
