Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
dblwrapper.js
Advanced tools
A package where you can find everything to interact with discord botlists!
npm install dblwrapper.js
yarn add dblwrapper.js
pnpm add dblwrapper.js
Discord Bot List is a comprehensive library that simplifies interacting with major bot lists. It not only allows you to easily post your bot's statistics to multiple Discord bot lists but also provides various other useful functions. With this library, you can check who has voted for your bot, retrieve detailed information about bots and users, and much more. It supports popular bot listing platforms and is designed to be user-friendly.
Please note that while this library aims to support all major bot lists, some lists may not have been thoroughly tested yet.
Icon | Name | Website | Class Name |
---|---|---|---|
Top.gg | top.gg | TopGG |
More will be added soon |
---|
const { BotList, BotListPoster } = require('dblwrapper.js');
const lists = [
new BotList.TopGG('you-bot-id', 'your-top.gg-api-token')
];
const poster = new BotListPoster(lists, {
shardCount: () => 1,
guildCount: () => 25,
userCount: () => 45778,
voiceConnectionCount: () => 3,
});
// It is adviable to use real values for the above functions
poster.postStatistics(); //Post stats once
poster.startAutoPosting(); //Post stats every 30 minutes
poster.startAutoPosting(5 * 60 * 1000); //Post stats every 5 minutes
poster.stopAutoPoster(); //Stop auto posting
https://example.com/receive/<list>/vote
const { BotList, Webhook } = require('dblwrapper.js');
const lists = [
new BotList.TopGG('you-bot-id', 'your-top.gg-api-token', 'webhook-token') //Webhook URL: https://example.com/receive/topgg/vote
];
const poster = new Webhook(lists, {
port: 3000, // Port to listen on
handleAfterVote: (req, res) => {
// Do something after a user votes
}, // This isnt required
});
// If you don't give handleAfterVote function, it will send a 200 response to the webhook and inbuilt events will be emitted
webhook.on(Webhook.Events.Ready, () => {
// This event is emitted when the webhook is ready
console.log("Webhook is ready!")
})
webhook.on(Webhook.Events.NewVote, (botList, vote) => {
// This event is emitted when a new vote is recieved
console.log(`New vote on ${botList.key} from ${vote.userId}`)
})
const { BotList : TopGG } = require('dblwrapper.js');
const topgg = new TopGG('bot-id', 'api-token', 'webhook-password');
// Get bot information from Top.gg
topgg.getBot('bot-id').then(response => {
console.log(response);
}).catch(console.error);
// Get user information from Top.gg
topgg.getUser('user-id').then(response => {
console.log(response);
}).catch(console.error);
// Check if user has voted for your bot
topgg.hasVoted().then(response => {
console.log(response);
}).catch(console.error);
/*
true -> user voted in the last 24 hours
false -> user didnt vote in the last 24 hours
*/
FAQs
A package where you can find everything to interact with discord botlists!
We found that dblwrapper.js 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
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.