goat
command
ffinfo
Free Fire player info
0
views
0
likes
0
installs
Aliases: ff
raw source
const axios = require("axios");
module.exports = {
config: {
name: "ffinfo",
aliases: ["ff"],
version: "1.0",
author: "EryXenX",
countDown: 10,
role: 0,
shortDescription: "Free Fire player info",
longDescription: "Get Free Fire player account info by UID",
category: "utility",
guide: {
en: "{p}ffinfo <uid> [region]\nExample: {p}ffinfo 1633864660 BD",
},
},
onStart: async function ({ api, event, args, message }) {
const uid = args[0]?.trim();
const region = args[1]?.trim() || "BD";
if (!uid) {
return message.reply("No UID provided!\n\nExample: !ffinfo 1633864660 BD");
}
const { messageID } = event;
await api.setMessageReaction("⏳", messageID, () => {}, true);
try {
const apiUrl = `https://eryxenx.agi.bd/api/ffinfo?uid=${encodeURIComponent(uid)}®ion=${encodeURIComponent(region)}`;
const response = await axios.get(apiUrl, { timeout: 30000 });
if (!response.data.success) {
throw new Error(response.data.error || "Failed to fetch player info");
}
const info = response.data.data.basicInfo || {};
const body =
`👤 Nickname: ${info.nickname || "N/A"}\n` +
`🆔 UID: ${info.accountId || uid}\n` +
`🌍 Region: ${info.region || region}\n` +
`📊 Level: ${info.level || "N/A"}\n` +
`⭐ EXP: ${info.exp || "N/A"}\n` +
`❤️ Likes: ${info.liked || "N/A"}\n` +
`🏆 Rank: ${info.rank || "N/A"}`;
await api.setMessageReaction("✅", messageID, () => {}, true);
await message.reply(body);
} catch (err) {
await api.setMessageReaction("❌", messageID, () => {}, true);
message.reply(`Failed to fetch player info!\n\nError: ${err.message}`);
}
},
};