Skip to content

shiorijs/shiori

Repository files navigation

shiori

A lightweight discord library made for NodeJS.

Customizable cache

const { Client } = require("hitomi.js");

// Keep a note that all cache options aren't required
const client = new Client("MY_SECRET_TOKEN", {
  cache: {
    users: {
      // No limit on users
      limit: Infinity,
      // If the username starts with A it will be added to the collection, otherwise it wont
      toAdd: (userID, user) => user.username.startsWith("A"),
      // If the user isn't a owner then remove it when sweeping!
      toRemove: (user) => !process.env.OWNERS.includes(user.id)),
      // Choose how much users to clear when sweeping
      sweep: 50,
      // Interval in MS that the sweep will occur
      sweepTimeout: 60000
    }
  }
});

About

A customizable and fast NodeJS library made for interacting with the discord api.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published