npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

Iโ€™ve always been into building performant and accessible sites, but lately Iโ€™ve been taking it extremely seriously. So much so that Iโ€™ve been building a tool to help me optimize and monitor the sites that I build to make sure that Iโ€™m making an attempt to offer the best experience to those who visit them. If youโ€™re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, ๐Ÿ‘‹, Iโ€™m Ryan Hefnerย  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If youโ€™re interested in other things Iโ€™m working on, follow me on Twitter or check out the open source projects Iโ€™ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soonโ€“ish.

Open Software & Tools

This site wouldnโ€™t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you ๐Ÿ™

ยฉ 2026 โ€“ย Pkg Stats / Ryan Hefner

lunahub-full

v1.0.0

Published

๐ŸŒ™ LunaHUB Full - All-in-One Library with Discord Bot Support

Readme

๐ŸŒ™ LunaHUB Full - Complete Discord Bot Framework

npm version license node version discord.js

LunaHUB Full is the complete all-in-one package with full Discord Bot support! Includes discord.js, webhooks, utilities, and everything you need to build Discord bots! ๐Ÿค–๐Ÿš€

โš ๏ธ Important Note

This package includes discord.js and is larger (~80 MB) than the regular lunahub package. Installation takes 30 seconds - 2 minutes.

  • Want lightweight? Use lunahub (500 KB, 3 seconds)
  • Want full Discord Bot? Use lunahub-full (80 MB, 1-2 minutes) โ† You are here!

โœจ Features

  • ๐Ÿค– Full Discord Bot - Complete discord.js integration
  • ๐Ÿ“จ Discord Webhooks - Easy webhook management
  • ๐ŸŽจ Embeds & Buttons - Rich message components
  • ๐ŸŒ HTTP Client - Powerful HTTP requests
  • ๐Ÿ’ฐ TrueWallet API - Voucher redemption
  • ๐Ÿ› ๏ธ Utilities - Useful helper functions
  • ๐Ÿ” Crypto - Basic encryption tools

๐Ÿ“ฆ Installation

npm install lunahub-full

Requirements:

  • Node.js >= 16.9.0
  • Internet connection for Discord API

๐Ÿš€ Quick Start - Discord Bot

Basic Bot Example

const luna = require('lunahub-full');

// Create bot
const bot = luna.discordBot.createBot();

// Bot ready event
bot.on('ready', () => {
    console.log(`โœ… Bot logged in as ${bot.user.tag}!`);
});

// Simple command
bot.luna.onCommand('!', 'ping', async (message) => {
    await message.reply('๐Ÿ“ Pong!');
});

// Login
bot.login('YOUR_BOT_TOKEN');

Bot with Embed

const luna = require('lunahub-full');

const bot = luna.discordBot.createBot();

bot.luna.onCommand('!', 'info', async (message) => {
    await bot.luna.replyEmbed(message, {
        title: '๐Ÿ“Š Server Info',
        description: 'Information about this server',
        color: luna.discordBot.colors.DISCORD,
        fields: [
            { name: '๐Ÿ‘ฅ Members', value: `${message.guild.memberCount}`, inline: true },
            { name: '๐Ÿ“… Created', value: message.guild.createdAt.toLocaleDateString(), inline: true }
        ],
        thumbnail: message.guild.iconURL(),
        footer: 'Powered by LunaHUB Full',
        timestamp: true
    });
});

bot.on('ready', () => console.log('โœ… Bot ready!'));
bot.login('YOUR_BOT_TOKEN');

Bot with Buttons

const luna = require('lunahub-full');

const bot = luna.discordBot.createBot();

bot.luna.onCommand('!', 'menu', async (message) => {
    const embed = luna.discordBot.createEmbed({
        title: '๐ŸŽฎ Game Menu',
        description: 'Choose an option:',
        color: luna.discordBot.colors.BLUE
    });

    const button1 = luna.discordBot.createButton({
        id: 'play',
        label: 'Play Game',
        style: luna.discordBot.ButtonStyle.Success,
        emoji: '๐ŸŽฎ'
    });

    const button2 = luna.discordBot.createButton({
        id: 'rules',
        label: 'Rules',
        style: luna.discordBot.ButtonStyle.Primary,
        emoji: '๐Ÿ“œ'
    });

    const row = luna.discordBot.createActionRow(button1, button2);

    await message.reply({ embeds: [embed], components: [row] });
});

// Handle button clicks
bot.on('interactionCreate', async (interaction) => {
    if (!interaction.isButton()) return;

    if (interaction.customId === 'play') {
        await interaction.reply('๐ŸŽฎ Starting game...');
    } else if (interaction.customId === 'rules') {
        await interaction.reply('๐Ÿ“œ Here are the rules...');
    }
});

bot.on('ready', () => console.log('โœ… Bot ready!'));
bot.login('YOUR_BOT_TOKEN');

๐Ÿ“– Complete Bot Examples

Welcome Bot

const luna = require('lunahub-full');

const bot = luna.discordBot.createBot();

bot.on('guildMemberAdd', async (member) => {
    const channel = member.guild.channels.cache.find(ch => ch.name === 'welcome');
    if (!channel) return;

    const embed = luna.discordBot.createEmbed({
        title: '๐Ÿ‘‹ Welcome!',
        description: `Welcome to the server, ${member.user}!`,
        color: luna.discordBot.colors.GREEN,
        thumbnail: member.user.displayAvatarURL(),
        fields: [
            { name: '๐Ÿ“Š Member Count', value: `${member.guild.memberCount}`, inline: true },
            { name: '๐Ÿ“… Account Created', value: member.user.createdAt.toLocaleDateString(), inline: true }
        ],
        footer: 'Enjoy your stay!',
        timestamp: true
    });

    await channel.send({ embeds: [embed] });
});

bot.on('ready', () => console.log('โœ… Welcome Bot ready!'));
bot.login('YOUR_BOT_TOKEN');

Moderation Bot

const luna = require('lunahub-full');

const bot = luna.discordBot.createBot();

// Kick command
bot.luna.onCommand('!', 'kick', async (message, args) => {
    if (!message.member.permissions.has('KickMembers')) {
        return message.reply('โŒ You need Kick Members permission!');
    }

    const member = message.mentions.members.first();
    if (!member) {
        return message.reply('โŒ Please mention a user to kick!');
    }

    const reason = args.slice(1).join(' ') || 'No reason provided';

    try {
        await member.kick(reason);
        
        await bot.luna.replyEmbed(message, {
            title: 'โœ… Member Kicked',
            description: `${member.user.tag} has been kicked`,
            color: luna.discordBot.colors.SUCCESS,
            fields: [
                { name: 'Reason', value: reason },
                { name: 'Moderator', value: message.author.tag }
            ]
        });
    } catch (error) {
        await message.reply('โŒ Failed to kick member!');
    }
});

bot.on('ready', () => console.log('โœ… Mod Bot ready!'));
bot.login('YOUR_BOT_TOKEN');

TrueWallet Bot

const luna = require('lunahub-full');

const bot = luna.discordBot.createBot();

bot.luna.onCommand('!', 'redeem', async (message, args) => {
    if (args.length < 2) {
        return message.reply('Usage: !redeem <voucher_link> <phone>');
    }

    const [voucherLink, phone] = args;

    await message.reply('โณ Redeeming voucher...');

    const result = await luna.truewallet.redeemVoucher(voucherLink, phone);

    const embed = luna.discordBot.createEmbed({
        title: result.status.code === 'SUCCESS' ? 'โœ… Voucher Redeemed!' : 'โŒ Redeem Failed',
        description: result.status.message,
        color: result.status.code === 'SUCCESS' 
            ? luna.discordBot.colors.SUCCESS 
            : luna.discordBot.colors.ERROR,
        fields: result.data ? [
            { name: '๐Ÿ’ฐ Amount', value: `${result.data.amount} THB`, inline: true },
            { name: '๐Ÿ“ฑ Phone', value: phone, inline: true }
        ] : [],
        timestamp: true
    });

    await message.reply({ embeds: [embed] });
});

bot.on('ready', () => console.log('โœ… TrueWallet Bot ready!'));
bot.login('YOUR_BOT_TOKEN');

๐ŸŽจ Discord Embeds

Create Beautiful Embeds

const embed = luna.discordBot.createEmbed({
    title: '๐ŸŽ‰ Announcement',
    description: 'This is an important announcement!',
    color: luna.discordBot.colors.DISCORD,
    url: 'https://example.com',
    author: {
        name: 'Admin Team',
        iconURL: 'https://example.com/icon.png'
    },
    fields: [
        { name: 'Category', value: 'Updates', inline: true },
        { name: 'Priority', value: 'High', inline: true },
        { name: 'Details', value: 'Full details here...' }
    ],
    thumbnail: 'https://example.com/thumb.png',
    image: 'https://example.com/image.png',
    footer: 'Announcement System',
    timestamp: true
});

// Send embed
await channel.send({ embeds: [embed] });

Available Colors

luna.discordBot.colors = {
    RED: 0xFF0000,
    GREEN: 0x00FF00,
    BLUE: 0x0000FF,
    YELLOW: 0xFFFF00,
    PURPLE: 0x800080,
    ORANGE: 0xFFA500,
    DISCORD: 0x5865F2,
    SUCCESS: 0x00FF00,
    ERROR: 0xFF0000,
    WARNING: 0xFFFF00,
    INFO: 0x0099FF
}

๐Ÿ“จ Webhooks (Still Available!)

// Send simple webhook
await luna.webhook.send('YOUR_WEBHOOK_URL', {
    content: 'Hello from LunaHUB Full! ๐Ÿค–',
    username: 'My Bot',
    avatarUrl: 'https://example.com/avatar.png'
});

// Send embed via webhook
const embed = luna.discordBot.createEmbed({
    title: 'Webhook Message',
    description: 'Sent via webhook!',
    color: luna.discordBot.colors.BLUE
});

await luna.webhook.sendEmbed('YOUR_WEBHOOK_URL', embed);

๐ŸŒ HTTP Client

// GET request
const response = await luna.get('https://api.example.com/data');

// POST request
await luna.post('https://api.example.com/users', {
    name: 'John',
    email: '[email protected]'
});

๐Ÿ’ฐ TrueWallet

const result = await luna.truewallet.redeemVoucher(
    'https://gift.truemoney.com/campaign/?v=xxxxx',
    '0812345678'
);

console.log(result);

๐Ÿ› ๏ธ Utilities

// Sleep
await luna.utils.sleep(1000);

// Random
const num = luna.utils.random(1, 100);
const str = luna.utils.randomString(16);

// Format
console.log(luna.utils.formatNumber(1234567)); // "1,234,567"
console.log(luna.utils.formatDate()); // "2024-11-23 14:30:00"

// Array operations
const chunks = luna.utils.chunk([1,2,3,4,5,6], 2); // [[1,2], [3,4], [5,6]]

๐Ÿ“‹ Full API Reference

Discord Bot

  • luna.discordBot.createBot(options) - Create Discord bot client
  • luna.discordBot.createEmbed(options) - Create embed
  • luna.discordBot.createButton(options) - Create button
  • luna.discordBot.createActionRow(...buttons) - Create action row
  • bot.luna.onCommand(prefix, name, callback) - Easy command handler
  • bot.luna.replyEmbed(message, options) - Quick embed reply

Webhooks

  • luna.webhook.send(url, options) - Send webhook message
  • luna.webhook.sendEmbed(url, embed, options) - Send embed

HTTP

  • luna.get(url, config) - GET request
  • luna.post(url, data, config) - POST request
  • luna.put(url, data, config) - PUT request
  • luna.delete(url, config) - DELETE request

TrueWallet

  • luna.truewallet.redeemVoucher(link, phone) - Redeem voucher

Utils

  • luna.utils.sleep(ms) - Delay
  • luna.utils.random(min, max) - Random number
  • luna.utils.randomString(length) - Random string
  • luna.utils.formatNumber(num) - Format number
  • luna.utils.formatDate(date, format) - Format date
  • luna.utils.chunk(array, size) - Split array

Crypto

  • luna.crypto.base64Encode(str) - Encode base64
  • luna.crypto.base64Decode(str) - Decode base64
  • luna.crypto.generateToken(length) - Generate token

๐ŸŽฏ LunaHUB vs LunaHUB Full

| Feature | lunahub | lunahub-full | |---------|---------|--------------| | HTTP Client | โœ… | โœ… | | Webhooks | โœ… | โœ… | | TrueWallet | โœ… | โœ… | | Utilities | โœ… | โœ… | | Discord Bot | โŒ | โœ… | | Embeds & Buttons | Basic | Full | | Size | 500 KB | 80 MB | | Install Time | 3 sec | 1-2 min | | Node.js Required | >= 14.0 | >= 16.9 |


๐Ÿ’ก Getting Your Bot Token

  1. Go to https://discord.com/developers/applications
  2. Create a "New Application"
  3. Go to "Bot" section
  4. Click "Reset Token" and copy it
  5. Enable necessary intents (Message Content, Server Members, etc.)
  6. Go to OAuth2 โ†’ URL Generator
  7. Select bot scope and permissions
  8. Invite bot to your server

โš ๏ธ Important Notes

  • Keep your bot token secret! Never share it publicly
  • Enable intents in Discord Developer Portal for bot to work
  • Node.js >= 16.9.0 required for discord.js
  • Installation takes time due to discord.js size (~80 MB)

๐Ÿ“ฆ Dependencies

  • axios - HTTP client
  • discord.js - Discord bot library

๐Ÿค Contributing

Contributions welcome! Open issues or PRs on GitHub.


๐Ÿ“„ License

MIT ยฉ LunaHUB Team


๐Ÿ”— Links

  • npm: https://www.npmjs.com/package/lunahub-full
  • Regular Version: https://www.npmjs.com/package/lunahub
  • Discord.js Docs: https://discord.js.org

Made with ๐ŸŒ™ by LunaHUB Team