/discord.js-ghost-ping

Detect Ghost Pings inside of discord.js!

Primary LanguageJavaScriptMIT LicenseMIT

Verison Downloads npm bundle size

Getting Started

About

discord.js-ghost-ping is a Node.js module that allows you to detect ghost pings inside of discord.js v13!

The package is guaranteed to detect all ghost pings and allows you to customize the embed sent: letting you change the title, colour, footer and the channel it's sent in.

This package comes from the developer of verified bots: @Coin Flipper#1767 and @autoMod#8328

What does the package do?

  • Detect Ghost Pings
  • Send Messages As the Bot

Help

If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please don't hesitate to join our Discord Server.

Installation

Install with npm:

$ npm install discord.js-ghost-ping

Install with yarn:

$ yarn add discord.js-ghost-ping

Example Usage

This is a working example.

const Discord = require('discord.js');
const client = new Discord.Client({
    intents: ['GUILD', 'GUILD_MESSAGES'],
})

const GhostPing = require('discord.js-ghost-ping');

client.on('messageDelete', async (message) => {
	await GhostPing.detector('messageDelete', message);
})

client.on('messageUpdate', async (oldMessage, newMessage) => {
	await GhostPing.detector('messageUpdate', oldMessage, newMessage);
})

client.login(process.env['MyToken']);