
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
discord-tool
Advanced tools
Need help? Contact me on Discord.
npm i --save discord-tool
yarn add discord-tool
const { AntiCrash } = require('discord-tool'); // CJS
import { AntiCrash } from 'discord-tool'; // ESM
new AntiCrash(client /* Discord.Client */);
// Tips:
/*
You can use this to prevent your bot from crashing. In short, the bot does not shut down when it gives an error.
*/
const { DeleteMessage } = require('discord-tool'); // CJS
import { DeleteMessage } from 'discord-tool'; // ESM
await channel.send('dpr').then(msg => DeleteMessage(message /* Discord.Message */, 4000));
const { MessageFinder } = require('discord-tool'); // CJS
import { MessageFinder } from 'discord-tool'; // ESM
await MessageFinder(message /* Discord.Message */, 'content', { limit: 10, caseSensitive: true, include: true });
// Tips:
/*
if include is false, it will return the message that doesn't include the content.
if caseSensitive is false, it will return the message that doesn't include the content with case insensitive.
*/
const { GetFlags } = require('discord-tool'); // CJS
import { GetFlags } from 'discord-tool'; // ESM
GetFlags(message.author.flags /* Discord.UserFlagsBitField | null */);
// Output: [ 'HypeSquadOnlineHouse3', 'ActiveDeveloper' ]
const { Random } = require('discord-tool'); // CJS
import { Random } from 'discord-tool'; // ESM
Random.number(1 /* Min */, 10 /* Max */); // Output: 5
Random.array(['l', 'o', 'i', 'r', 'e', 'n']); // Output: 'i'
const { MatchEmojis } = require('discord-tool'); // CJS
import { MatchEmojis } from 'discord-tool'; // ESM
MatchEmojis('developed by loiren 👍 <a:nice_emoji:1171093533831200798>'); // Output: ['👍', '<a:nice_emoji:1171093533831200798>']
const { CheckURL } = require('discord-tool'); // CJS
import { CheckURL } from 'discord-tool'; // ESM
CheckURL('https://loiren.now.sh'); // Output: true
CheckURL('loiren'); // Output: false
const { CheckInvite } = require('discord-tool'); // CJS
import { CheckInvite } from 'discord-tool'; // ESM
CheckInvite('https://discord.gg/partnerbot'); // Output: true
CheckInvite('https://loiren.now.sh'); // Output: false
const { Colors } = require('discord-tool'); // CJS
import { Colors } from 'discord-tool'; // ESM
Colors.Blank // This is a blank color.
FAQs
A best tool for discord bot
The npm package discord-tool receives a total of 6 weekly downloads. As such, discord-tool popularity was classified as not popular.
We found that discord-tool demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.