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

@elara-services/automod-dms

v1.2.0

Published

Sends users or members in roles DM notifications when Discord built-in AutoMod gets triggered

Downloads

11

Readme

About

This package will DM (Direct Message) the members in the notify.role or notifications.role for the action on that server or user IDs in the notify.users or notifications.users arrays.

NOTE: This works along side Discord's built-in AutoMod system


Getting Started

NOTE: For this to work you need to have Block Message option enabled in the Discord built-in AutoMod filter!

This package supports both discord.js v13 and v14

const { AutoModDMNotifications } = require("@elara-services/automod-dms");

const automod = new AutoModDMNotifications({
    client, // Your discord.js Client 
    actions: [ // An array of actions for the bot to watch for. 
        {
            enabled: true, // If this action should be enabled
            guild_id: "12345678", // The server ID for this action only.
            ignoreRules: [ // To ignore a certain AutoMod rule from being sent to notify/notification users
                "2133456", 
            ],
            fetchAllMembers: true, // If you want the package to automatically fetch all members for the provided server ID (REQUIRES: 'GUILD_MEMBERS' intent)
            notify: { // People in this option will get the user's message content or what got filtered. 
                enabled: true, // If the notify role/users should be notified
                selectmenu: true, // If the "Moderation Actions" select menu should be sent in DMs to the notify.role members or notify.users people 
                role: "2134567", // The notify role ID, anyone in this role will get DM Notify Alerts
                users: [ // The user IDs for anyone you want to get the DM Notify Alerts
                    "21345678"
                ]
            },
            notifications: { // People in this option will not get the user's message content or what got filtered. 
                enabled: true, // If the notifications role/users should be notified
                selectmenu: true, // If the "Moderation Actions" select menu should be sent in DMs to the notifications.role members or notifications.users people 
                role: "2134567", // The notifications role ID, anyone in this role will get DM Notifications Alerts
                users: [ // The user IDs for anyone you want to get the DM Notifications Alerts
                    "21345678"
                ]
            },
        }
    ]
})

client.once("ready", () => {
    automod.run();
    // This will start the automod process. 
})