quiet-discordjs
v1.0.0
Published
Quiet discord.js, with no terminal and quiet.
Maintainers
Readme
quiet-discordjs
quiet-discordjs is a silent, modified version of discord.js. It disables all internal error throwing and console logging, making it suitable for environments where stability and silence are preferred.
Changes
- No Errors: Suppresses all thrown errors, including DiscordjsError, TypeError, and rejections.
- No Logs: Disables all console outputs such as console.log, console.error, and process warnings.
About
quiet-discordjs (a fork of discord.js) is a powerful Node.js module that allows you to easily interact with the Discord API.
- Object-oriented
- Predictable abstractions
- High performance
- Full coverage of the Discord API
Installation
Node.js 18 or newer is required.
npm install quiet-discordjsor
yarn add quiet-discordjsOptional packages
These packages are not part of this module, but they are supported by the underlying discord.js library.
- zlib-sync for WebSocket data compression
- bufferutil for faster WebSocket performance
- @discordjs/voice for voice support
Example usage
Registering a slash command:
import djs from 'quiet-discordjs';
const commands = [
{
name: 'ping',
description: 'Replies with Pong!',
},
];
const rest = new djs.REST({ version: '10' }).setToken(TOKEN);
try {
await rest.put(djs.Routes.applicationCommands(CLIENT_ID), { body: commands });
} catch (error) {
return;
}Creating a simple bot:
import djs from 'quiet-discordjs';
const client = new djs.Client({ intents: [djs.GatewayIntentBits.Guilds] });
client.on('ready', () => {
console.log(`Logged in as ${client.user.tag}`);
});
client.on('interactionCreate', async interaction => {
if (!interaction.isChatInputCommand()) return;
if (interaction.commandName === 'ping') {
await interaction.reply('Pong!');
}
});
client.login(TOKEN);To Block Closing When Error
import djs from 'quiet-discordjs';
const client = new djs.Client({ intents: [djs.GatewayIntentBits.Guilds] });
client.on('ready', () => {
console.log(`Logged in as ${client.user.tag}`);
});
client.on('messageCreate', async message => {
if(message.author.bot) return;
if(message.content == "a!reply") {
try {
message.reply(); //gonna give error, so we gonna add try
} catch(error) {
console.log("error") //or: return;
}
}
});
client.login(TOKEN);Links
These belong to the original discord.js project.
Contributing
This is not an official fork. Please refer to the original discord.js contribution guide for details.
Help
For help with the Discord API or discord.js behavior, please visit the discord.js Discord server.
Note: This library is not affiliated with or endorsed by the original discord.js team.
