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

discord-autoresponder

v1.3.0

Published

Automate Discord bot replies with ease using discord-autoresponder for dynamic, custom trigger-based interactions.

Downloads

29

Readme

Discord Autoresponder - Comprehensive Documentation 🚀🤖


Welcome to the official documentation for Discord Autoresponder, an advanced and versatile framework designed to elevate your Discord.js bot with intelligent and dynamic automatic responses. This documentation provides an in-depth guide on integrating and maximizing the features of the Discord Autoresponder npm package.


Key Features 🌟

  • 🧠 Intelligent Autoresponses: Craft dynamic responses based on triggers, conditions, and user roles.
  • 🔄 Dynamic Response Generation: Utilize asynchronous functions for dynamic content generation.
  • 🎨 Customization Options: Tailor responses based on message content and customize embeds for rich messaging.
  • 🔍 Automatic Update Checks: Autoresponder checks for updates and notifies you of new versions.

Installation ⚙️

To empower your bot with Discord Autoresponder, initiate the installation via npm:

npm install discord-autoresponder

Getting Started 🚀

Initializing Autoresponder

const { Client } = require("discord.js");
const AutoResponder = require("discord-autoresponder");

// Create a Discord.js client
const client = new Client();

// Set up Autoresponder with optional autoresponses
const autoresponder = new AutoResponder(client, [
  { trigger: "hello", response: "Hello there!" },
  // Add more autoresponses as needed
]);

// Additional bot setup...

// Launch the bot
client.login("YOUR_BOT_TOKEN");

Advanced Features 🌟

Adding Autoresponses with Conditions 🧠

// Craft a VIP welcome based on user roles
autoresponder.addAutoResponse("vip", (message) => {
  if (message.member.roles.cache.some((role) => role.name === "VIP")) {
    return `Welcome, VIP ${message.author.username}!`;
  }
  return "Access denied.";
});

Dynamic Response Generation 🔄

// Infuse dynamic responses using async functions
autoresponder.addAutoResponse("asyncExample", async (message) => {
  const userData = await fetchUserData(message.author.id);
  return `Hello, ${userData.username}!`;
});

Automatic Update Checks 🔄

Autoresponder checks for updates and notifies you if a new version is available for seamless version control.

Example Usage 🌈

// Extend greetings to new members
autoresponder.addAutoResponse("welcome", (message) => {
  return `Welcome to the server, ${message.author.username}!`;
});

// Swiftly reply to specific keywords
autoresponder.addAutoResponse("ping", "Pong!");

// Bid farewell when a user leaves
autoresponder.addAutoResponse("goodbye", "Goodbye, see you next time!");

// Craft condition-based responses
autoresponder.addAutoResponse("customGreeting", (message) => {
  const content = message.content.toLowerCase();
  if (content.includes("good morning")) {
    return "Good morning!";
  } else if (content.includes("good night")) {
    return "Good night!";
  }
  return null;
});

// Remove an autoresponse
autoresponder.removeAutoResponse("triggerToRemove");

// Display a list of all autoresponses
autoresponder.listAutoResponses();

Node.js and Discord.js Compatibility

The Discord Autoresponder is designed to seamlessly integrate with the latest stable versions of Node.js and Discord.js. As of the time of writing, these versions are regularly updated. In case Discord Autoresponder doesn't work with your specific Node.js or Discord.js version, rest assured that our dedicated support team is ready to assist you.

  • Node.js Compatibility: v20.11.0 and above
  • Discord.js Compatibility: v14.14.1 and above

Feel free to reach out to our support channels for any compatibility concerns or assistance.


Support and Updates

Need help with setting up or using the Discord Autoresponder? Join our dedicated Discord server: https://dsc.gg/reliable-support. Our friendly community and support team are always ready to assist you. 🌟