Skip to content

sazidbro/ku

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

385 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation


Version Node Base Fork FCA


β—ˆ About

GOAT MESSENGER is a modified fork of Goat Bot V2 by ntkhang03, enhanced and maintained by EryXenX.

Feature Description
πŸ”Œ Custom FCA Uses fca-eryxenx β€” patched fork with bug fixes and stability improvements
βš™οΈ Handler Improvements No-prefix system for bot admins, smart command suggestion
🎨 UI Overhaul Redesigned message templates with clean formatting
πŸ›‘οΈ React Unsend Auto-unsend messages on specific emoji reactions
πŸ”§ Setting Command Full bot config control via chat β€” no need to edit files manually

β—ˆ Support

Messenger Group Facebook GitHub YouTube Telegram Instagram


β—ˆ Credits

Role Person Link
πŸ† Original Creator NTKhang Goat Bot V2
πŸ”§ This Fork EryXenX GOAT-MESSENGER

All core copyright belongs to NTKhang (ntkhang03). This fork does not override the original license.


β—ˆ Setup Tutorial

πŸ“Ή Watch Before You Start

GOAT MESSENGER Setup Tutorial

Watch Tutorial


β—ˆ Setup

git clone https://github.com/EryXenX/GOAT-MESSENGER.git
cd GOAT-MESSENGER
npm install
node index.js

Add your Facebook cookies to account.txt (JSON array format from EditThisCookie), then configure config.json.


β—ˆ Command Structure

Commands go in scripts/cmds/yourcommand.js.

module.exports = {
  config: {
    name: "commandname",        // trigger name
    version: "1.0.0",
    author: "YourName",
    countDown: 5,               // cooldown in seconds
    role: 0,                    // 0 = everyone, 1 = group admin, 2 = bot admin
    shortDescription: "...",
    longDescription: "...",
    category: "fun",
    guide: "{prefix}commandname [args]"
  },

  // ─── Triggered when command is used ───
  onStart: async function ({ api, event, args, message, getLang }) {
    message.reply("Hello!");
  },

  // ─── Triggered when someone replies to bot's message ───
  onReply: async function ({ api, event, Reply, message }) {
    if (event.senderID !== Reply.author) return;
    message.reply(`You replied: ${event.body}`);
  },

  // ─── Triggered when someone reacts to bot's message ───
  onReaction: async function ({ api, event, Reaction, message }) {
    message.reply(`You reacted with: ${event.reaction}`);
  },

  // ─── Triggered on every message (no prefix needed) ───
  onChat: async function ({ api, event, message }) {
    if (event.body === "hello") message.reply("hi!");
  },

  // ─── Triggered on thread events (join/leave etc.) ───
  onEvent: async function ({ api, event, message }) {
    if (event.logMessageType === "log:subscribe") {
      message.reply("Welcome!");
    }
  }
};

β—ˆ Permission Roles

Value Who can use
0 Everyone
1 Group admins only
2 Bot admins only (set in config.json)

β—ˆ API Reference

message.reply("text")                              // reply to current message
api.sendMessage("text", threadID)                  // send to any thread
api.sendMessage({ body: "text", attachment }, tid) // send with file/image
api.setMessageReaction("βœ…", event.messageID, () => {}, true)
api.unsendMessage(messageID)
api.getCurrentUserID()
await api.getThreadInfo(threadID)
await api.getUserInfo(userID)

β—ˆ onReply Pattern

// In onStart β€” register reply listener
const sent = await message.reply("What's your name?");
global.GoatBot.onReply.set(sent.messageID, {
  commandName: "mycommand",
  messageID: sent.messageID,
  author: event.senderID,
  step: 1  // any extra data
});

// In onReply β€” handle the reply
onReply: async function ({ api, event, Reply, message }) {
  if (event.senderID !== Reply.author) return;
  message.reply(`Hello, ${event.body}!`);
}

β—ˆ Event Types

switch (event.logMessageType) {
  case "log:subscribe":    // User joined
  case "log:unsubscribe":  // User left
  case "log:thread-name":  // Group name changed
  case "log:thread-image": // Group photo changed
  case "log:thread-admins":// Admin list changed
}

β—ˆ config.json Key Options

{
  "prefix": "-",
  "adminBot": ["your_facebook_id"],
  "noPrefix": { "enable": false },
  "reactUnsend": {
    "enable": true,
    "onlyAdmin": true,
    "emojis": ["😑"]
  },
  "optionsFca": {
    "listenEvents": true,
    "autoMarkDelivery": false,
    "updatePresence": false,
    "selfListen": false,
    "autoReconnect": true
  }
}

Built on the shoulders of giants Β· Respect Open Source Β· Credit your sources
Original Work Β© NTKhang (ntkhang03) Β |Β  Fork by EryXenX

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors