
Research
/Security News
Coruna Respawned: Compromised art-template npm Package Leads to iOS Browser Exploit Kit
Compromised npm package art-template delivered a Coruna-like iOS Safari exploit framework through a watering-hole attack.
djs-fetch: its A powerful utility for efficiently fetching various Discord resources. Simplify your bot development by easily retrieving users, guilds, channels, and more with a consistent and reliable interface.
npm i djs-fetch@latest
const Fetch = require("djs-fetch")
const { Client , GatewayIntentBits } = require("discord.js")
const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent,
],
})
client.fetch = new Fetch(client)
const Fetch = require("djs-fetch")
const { Client , GatewayIntentBits } = require("discord.js")
class CustomClient extends Client {
constructor() {
super({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent,
],
});
this.fetch = new Fetch(this);
}
}
// Fetch a user by ID
const userId = "123456789012345678";
const user = await client.fetch.user({ userId }); // or await client.fetch.user(userId)
if (user) {
console.log(`Fetched user: ${user.username}`);
} else {
console.log("User not found.");
}
// Fetch all users from a cache by guild ID
const guildId = "987654321098765432";
const users = await client.fetch.users();
if (users) {
console.log(`Fetched ${users.size} users from guild ${guildId}`);
} else {
console.log("Users not found.");
}
// Fetch a channel by channel ID
const channelId = "123456789012345678";
const channel = await client.fetch.channel({ channelId });
if (channel) {
console.log(`Fetched channel: ${channel.name}`);
} else {
console.log("Channel not found.");
}
// Fetch all channels from a guild by guild ID
const guildId = "987654321098765432";
const channels = await client.fetch.channels({ guildId });
if (channels) {
console.log(`Fetched ${channels.size} channels from guild ${guildId}`);
} else {
console.log("Channels not found.");
}
Fetch {
// GUILD
guild(guildId)
guilds() // No Need
// EMOJI
emoji(emojiId)
emojis(guildId)
// INVITE
invite(inviteCode)
invites(guildId)
// ROLE
role(guildId, roleId)
roles(guildId)
// MEMBER
member(guildId, userId)
members(guildId)
// MESSAGE
message(channelId, messageId)
messages(channelId)
// VOICESTATE
voiceState(guildId, userId)
voiceStates(guildId)
// BAN
ban(guildId, userId)
bans(guildId)
// THREAD
thread(channelId, threadId)
threads(channelId)
// REACTION
reaction(channelId, messageId) {
// REACTION USER
user(userId)
users() // No Need
}
// Usage: client.fetch.<method>
My Discord Username: devszero
FAQs
discord.js fetch handler
The npm package djs-fetch receives a total of 2 weekly downloads. As such, djs-fetch popularity was classified as not popular.
We found that djs-fetch 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.

Research
/Security News
Compromised npm package art-template delivered a Coruna-like iOS Safari exploit framework through a watering-hole attack.

Company News
As AI accelerates how code is written and shipped, Socket is scaling to protect the software supply chain from the growing wave of attacks targeting open source dependencies.

Company News
Socket is scaling to defend open source against supply chain attacks as AI accelerates software development.