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

knowledge-lamborghini

v0.9.0

Published

But you know what I like a lot more than knowledge? Knowledge.

Downloads

84

Readme

Knowledge Lamborghini

“But you know what I like a lot more than knowledge? Knowledge.”

Important links

Instructions (you are here): https://github.com/wyattscarpenter/knowledge-lamborghini/

Invite kl to your server (I think they've done several permission scheme reworks since I got this link, so who knows how that works ¯\_(ツ)_/¯): https://discord.com/api/oauth2/authorize?client_id=678989133196165152&permissions=0&scope=bot

Developer portal for editing details about the bot and finding the token (only works if you are me): https://discord.com/developers/applications/678989133196165152/

Information

This is Knowledge Lamborghini (“kl”), an eclectic discord bot with exactly these features:

Negative features

  • NO special sigil, all commands are invoked as they are written here. All commands are case-insensitive.
  • NO uptime, or stability guarantees. I commit broken features directly to master as I work on them. I may or may not have the bot running at any given time.
    • However, this bot is also published on npmjs.org, and only non-broken versions should make it up there.
  • NO particular security guarantees. While there's no particular reason to think data stored in the bot is INsecure, it is just stored in plaintext on a server somewhere. So I wouldn't recommend putting critical secrets in there.
  • NO automatic testing paradigm, because I didn't think about how easy it would be to do that until I had built all the features.

Positive features

A note about the commands: all commands are usually just as they are written here. Most commands have to be in their own message, and can't be put into the middle, beginning, or end, of another message. Parameters to commands (word or phrase used as data by the command) are noted below with descriptive phrases in square brackets, [like so]; replace the entire bracketed word/phrase, including the brackets, with the desired parameter, when invoking the command. Optional parameters are in parentheses. The order of parameters is significant, as that's what allows kl is figure out which parameter is intended to mean what.

  • @ the bot with a message containing "help" to get a link to this help document.
  • @ the bot with a message containing "version" to get the current version (this is also includes, for utility's sake, the current git hash and commit message; as mentioned above, the version number is always 0.1.0, at least for now).
  • Type think! and kl begins to recite the book located in text.json, one unit per hour in the channel in which you made the command. stop! ceases the madness.
  • Type a phrase that's something like who's that pokemon? and kl posts an image from wikimedia for you to guess the file name of. The first successful guess for any picture is acknowledged.
  • Using the power of NiceDice (https://github.com/wyattscarpenter/nicedice), kl interprets any message consisting solely of a dnd-style dice expression, generates random numbers to simulate dice rolls, and outputs the result.
  • Type set-for-channel [word] [response message] and kl will respond with the response message when the word is posted in the channel, by itself in a message (case-insensitive). This is a per-channel setting! You can remove a setting by setting it to the empty string. Some have found it exceptionally useful to make the response the bare url of an image that discord will then preview/embed/display directly, such as a link to an image that was previously uploaded to Discord.
  • set-probabilistic-for-channel (number) [word] [response message] is the same as set-for-channel, but sets a response in a pool of responses to be randomly selected, weighted by the number given (metaphorically, you can think of the response as a raffle, in which the response has [number] tickets)—if no number is given, that quantity defaults to 1 (if you'd like set [word] to be a number, you must provide [number], to avoid ambiguity). Naturally, to give any randomness to the effect, this command must be used multiple times. Also, using set-probabilistic on a word that already has a response set by set will turn that response into a one-ticket possibility.
  • set-for-server and set-probabilistic-for-server are the server-wide equivalents of the above commands. The banks of server responses and channel responses are different, so if you make overlapping responses kl might double-reply, etc.
  • set and set-probabilistic are aliases for set-for-server and set-probabilistic-for-server, respectively. This is because it is funnier in practice to make the default the most intrusive option.
  • enumerate responses lists all the responses for the channel.
  • remindme, followed by freeform text that includes a date or time of some sort that kl can interpret (I use the chrono-node library to try to parse these), will cause kl to reply to your message at that date. This feature is useful to remind you of things... if you're confident this tech stack will last that long!
  • '(!)remind( )me(!), where by parenthesized characters I mean they may be optionally included or excluded in all possible combinations, are also aliased to remindme. Furthermore, since the natural language parser rejects commands like "remindme 1 day" but accepts commands like "remindme in 1 day", remindme will insert an "in " automatically at the beginning and retry parsing, if the date parsing fails the first time.
  • death has many doors (starting a message; followed by any or no other text) will cause kl to post a message in that channel whenever someone leaves/is kicked from the server, identifying them by mention, tag, and user id. death has no doors will turn this feature off for a channel it is posted in.
  • Type crash and kl will crash. Please do not do this.
  • Reddit link “oldification”: links to reddit.com pages are immediately reposted as links to old.reddit.com pages.
  • KL displays the time in Los Angeles as its status, updated each minute.

Metadata

  • The code is public domain under CC0 1.0.
  • KL's icon is https://i.redd.it/1v4zaf534i851.jpg (also seen above) or best equivalent.
  • KL's motto is derivative of YouTube Poops of “Here in My Garage” by Tai Lopez.
  • Invite this bot using https://discord.com/api/oauth2/authorize?client_id=678989133196165152&permissions=0&scope=bot