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 🙏

© 2025 – Pkg Stats / Ryan Hefner

ahnidev

v1.0.6

Published

A utility package for discord bots to use.

Readme

Ahni / API

(Might be buggy still)

Installation

npm i ahnidev

How to use

const { AhniClient } = require('ahnidev');
const Ahni = new AhniClient({ KEY: "Your-API-Key-Here", url:"https://kyra.tk" }) // URL Required if main domain changed.

// NSFW Endpoints
api.nsfw("thighs").then(result => {
    console.log(result)
})

// Chat Endpoint
api.chat("MESSAGE%20CONTENT", "USERID").then(result => {
    console.log(result)
})

Discord Bot lists Posting;

const { AhniLists } = require('ahnidev');
const api = new AhniLists({})
// Post server count
// "topgg", "disforge", "boats", "bfd", "discords";
api.postCount("botId", {serverCount: 2, botList: "topgg", botListKey: "The-Api.Key"}).then(result => {
    console.log(result)
})
// Auto-Post server count
// Most lists have a waiting period (ratelimit); So please make sure you know to not bypass them with interval. (ie: Disforge has a 1/1h ratelimit)
api.autopostCount("botId", { serverCount: 2, botList: "disforge", botListKey: "The-Api.Key", interval: 60 }).then(result => {
    console.log(result)
})

AutoUnmute + Mute system

Mutes and unmutes.

// index.js

const { Client } = require('discord.js');
const client = new Client({ intents: ["GUILDS", "GUILD_MEMBERS"]});// Not sure about guild_members..?
const { AhniClient } = require('ahnidev');
const Ahni = new AhniClient({ KEY: "Your-API-Key-Here", url:"https://kyra.tk" }) // URL Required if main domain changed.
client.Ahni = Ahni;

client.Ahni.connectToMongoDB("Your-mongoDB-URL-Here");
client.Ahni.timed(client)// auto unmutes

// event when someones unmuted
client.on("timedUnmute", (user, guild)=>{
    console.log(`${user.name} (${user.id}) was unmuted in ${guild.name} (${guild.id})`)
})
...
// mute.js
        ...
    /** member { Discord.User }
      * time { Number }
      * reason { String }
      */
    client.Ahni.mute(member, time, reason)
        ...
// unmute.js
        ...
     /** 
      * client { Discord.Client }
      * user { Discord.User }
      */
    client.Ahni.forced(client, user)
        ...

Quote Command.js

Quotes a message via a messageID from message channel or Message URL.

        ...              ...                 ...
                // QuoteCommand.js
client.Ahni.quoteId(client, args[0], msg.channel).then(res => { 
// msg.channel (OR message.channel) is needed just the way it is unless you call the current channel differently.
const embed = new MessageEmbed()
    .setDescription(`\`\`\`${res.content}\`\`\``)
    .setTimestamp(res.createdAt)
    .setColor(res.author.accentColor || "WHITE")
    .setAuthor(res.author.username, res.author.avatarURL({ type: "png", dynamic: true, size: 4096 }), res.author.avatarURL({ type: "png", dynamic: true, size: 4096 }))
if (res.attachments && res.attachments.size > 0) {
    embed.setImage(res.attachments.first().url)
}
    console.log(res.content)
    msg.reply({ embeds: [embed] });
    });

...              ...                 ...
// Captcha system / event
const { AhniCaptcha } = require("ahnidev");
client.on("guildMemberAdd", (member) => {
    
// =============================================================================
    //  for captcha setup / sending.
    // channelID can be either a category OR a GUILD_TEXT/text-channel ;)
    const role = member.guild.roles.cache.get("xxxxxxxxxxxxxxxxx");
    const channel = member.guild.channels.fetch("xxxxxxxxxxxxxxxxx");
    new AhniCaptcha(client, {channelID: channel.id, attempts: 3, caseSensitive: false}).present(member, role, channel);
// =============================================================================
    // For antiJoin raid checking: (WIP)
    new AhniCaptcha(client).check(member, days, roleId, joinCount);
    // member = user
    // days = amount of days user has been registered for
    // roleId = mute/unverified roleId
    // joinCount = max amount of new joins before kicking this amount of users that joined recently. (the time frame is 6500ms [6~ seconds])
// =============================================================================

});

endpoints


|| NSFW ||

  • Just read Docs please...

|| SFW ||

  • chat

For an up to date list on endpoints visit kyra.tk | kyra.tk

For support join our discord