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

cycling-presence

v1.0.0

Published

Cycle Discord rich presence with a tiny, library-agnostic timer. Seyfert + discord.js adapters included.

Readme

60_000 ms. A loop. A healthier bot profile.

  [● now playing] ──▶ [♪ listening] ──▶ [◉ watching] ──▶ [⚑ competing] ──▶ loops forever

cycling-presence

Cycle rich presence for your Discord bot on a silent timer.

npm downloads size license CI

tiny - zero deps - seyfert + discord.js


the problem

Presence code is boring, repetitive, and always the same shape:

setTimeout(() => client.gateway.setPresence({ activities: [{ name: "Listening to lofi" }] }), minutes * 1000);

cycling-presence wraps the loop so you only write the lineup.

install

bun add cycling-presence
npm install cycling-presence

usage

import { CyclingPresence, seyfertPresence, playing, listening, streaming } from "cycling-presence";

await client.start();

new CyclingPresence({
  presences: [
    playing("Nazha Music"),
    listening("Nazha Radio"),
    streaming("Absurd Cafe", "https://twitch.tv/knownasrazi"),
    watching(`${serverCount} servers`),   // build it dynamically each cycle? see below
  ],
  setPresence: seyfertPresence(client),
  interval: 60_000,
  status: "online",
}).start();

Works with discord.js too:

import { CyclingPresence, discordJsPresence } from "cycling-presence";

new CyclingPresence({
  presences: ["Playing with slash commands", listening("lo-fi vibes")],
  setPresence: discordJsPresence(client), // discord.js >=14
  interval: 45_000,
}).start();

live data

The onCycle hook runs before each change - perfect for up-to-date server counts:

const cp = new CyclingPresence({
  presences: [playing("with /slash"), listening("the radio")],
  setPresence: seyfertPresence(client),
  onCycle: (presence) => {
    // presence.activity.name is already finalized; index is the second arg
  },
});
cp.set(0); // force the first one now

api

| member | does | | ------ | ---- | | new CyclingPresence(options) | engine instance | | .start() | apply first + cycle every interval ms | | .stop() | pause rotation | | .next() | manually advance one step | | .set(index) | jump to a specific presence | | .add(...) | append to the lineup | | .clear() | wipe the lineup | | .current | the active presence (or null) | | .running / .length | state | | .destroy() | stop + clear |

activity builders

| shorthand | Discord type | notes | | --------- | ------------ | ----- | | playing(name) | playing | | | streaming(name, url) | streaming | url required | | listening(name) | listening | | | watching(name) | watching | | | competing(name) | competing | |

Or pass raw objects - full control:

{
  activity: { name: "a custom state", type: 5 },
  status: "dnd",
}

options

| option | default | meaning | | ------ | ------- | ------- | | interval | 60_000 | ms between changes | | random | false | shuffle instead of in order | | status | - | fallback user status applied to every presence | | setPresence | required | how the presence reaches Discord | | onCycle | - | (presence, index) => void |

development

git clone https://github.com/knownasrazi/cycling-presence.git
cd cycling-presence
bun install
bun test
bun run build
bun run lint

license

MIT + Razi


set the playlist. forget the loop.