@reyhan6610/ngl
v1.0.0
Published
TypeScript wrapper for NGL.link API to send anonymous messages
Maintainers
Readme
NGL Send Message
📖 About NGL
With this library, you can send anonymous messages to NGL users through programs you create.
🚀 Features
· Send anonymous messages to NGL accounts · Supports TypeScript and CommonJS · Easy to use
📦 How to install
npm install @reyhan6610/nglyarn add @reyhan6610/ngl💻 How To Use
CommonJS
const { ngl } = require('@reyhan6610/ngl');
async function sendNGLMessage() {
try {
const result = await ngl[0].run({
req: {
query: {
link: "https://ngl.link/target", //Your target
text: "Hello!", //Message
count: 5 //count message send max 1000
}
}
});
console.log(result);
} catch (error) {
console.error(error);
}
}
sendNGLMessage();TypeScript
import { ngl, ApiResponse } from '@reyhan6610/ngl';
async function testNGL(): Promise<void> {
try {
const result: ApiResponse = await ngl[0].run({
req: {
query: {
link: "https://ngl.link/target", //Your target
text: "Hello!", //Message
count: "5" //count message send max 1000
}
}
});
console.log(JSON.stringify(result, null, 2));
if (result.status) {
console.log('Success:', result.data);
} else {
console.log(result.error);
}
} catch (error: any) {
console.error(error.message);
}
}
testNGL();📋 Response
The library returns an object with the following structure:
{
status: true,
data: {
totalAttempts: 5,
successful: 5,
failed: 0,
results: [ [Object], [Object], [Object], [Object], [Object] ],
errors: []
},
timestamp: '2025-11-16T06:45:02.087Z'
}⚠️ Disclaimer
Want to contribute? Please fork this repository and create a pull request.
📄 License
GPL v3 License – see the LICENSE file for full details.
