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 🙏

© 2024 – Pkg Stats / Ryan Hefner

hirsh

v0.0.4

Published

Automate the process of logging leaving users' roles and granting them back upon rejoin on a Discord server.

Downloads

2

Readme

Hirsh

Build Status FOSSA Status CodeFactor Scrutinizer Code Quality Known Vulnerabilities

https://nodei.co/npm/hirsh.png

The best solution to get rid of the stress and strain of manually re-assigning user roles, with minimal configuration requirements and an easy setup process, you'll enjoy the full benefits of task automation in no time.

Installation & Setup

You can install Hirsh through whichever dependency manager you prefer via commands similar to: npm i hirsh

Once installed, you can easily launch Hirsh by calling it from within your ready event like so:

const discord = require("discord.js"),
      client  = new discord.Client();

client.on("ready", () => {
    console.log(`Logged in as ${client.user.username}.`);

    // Call and initialize Hirsh.
    require("hirsh").Instance({
        "Parent": client, // Discord client instance.
        "Sudoers": ["236123737525583872", "02102020220202"] // etc... Your user ID or the IDs of the bot's owners.
    });
});

And voila! It's that simple! Now once you launch your bot, it should take a couple of seconds at most for Hirsh to kick in and it's smooth sailing from there.

Commands

| # | Name | Argument | Category | Permissions | Aliases | Description | Guild Only --- | --- | --- | --- | --- | --- | --- | --- 1 | set-logs | Channel ID | Configuration | Admin / Server Manager | mod-logs | Assigns the channel Hirsh will use for logs. | Yes

FAQ

So where can I invite this bot?

Hirsh is a self-hosted bot, meaning you have to download and set it up yourself and then invite it to your own server(s).

I want this thing to log what it does, is that possible?

Yes. You need only use the h.set-logs command to designate the channel you'd like Hirsh to document its actions in. It is recommended that you configure Hirsh's mod logs channel right after first launch, as it is disabled by default.

Is there a config file somewhere?

No, Hirsh comes with its own configuration commands suite that's intended to be a easier and more convenient for server personnel to configure it.

Hirsh is unable to add some roles?

  • Potential Reason #1: The bot under which Hirsh is operating does not possess the Manage Roles permission.

  • Potential Reason #2: You could also face this problem if the role Hirsh is trying to assign is above its own in the role hierarchy. To fix this, you can try pushing Hirsh up the hierarchy enough that it can assign that role.

  • Potential Reason #3: The process during which Hirsh ascertains which roles a user has had in order to award them back includes an additional step that checks whether any of the roles no longer exist on the server (by way of their IDs), if Hirsh failed to assign a role and it had nothing to do with permissions/role hierarchy, that would most likely be the reason.

I seem to be unable to use the configuration commands?

To use Hirsh's configuration commands, you must either be an administrator or possess Manage Server permissions.

Acknowledgements

This project would not be possible without the Discord.js library and its command framework Commando.

Other dependencies that this project uses and/or relies on include:

License

This tool is licensed under the MIT license. See the LICENSE file for more information. Credits are not necessary if you happen to use this project in the future but are appreciated.

FOSSA Status