Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@helperdiscord/dsc.gg

Package Overview
Dependencies
Maintainers
3
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@helperdiscord/dsc.gg

<img src="https://img.shields.io/gi

  • 1.1.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
3
Weekly downloads
 
Created
Source

@helperdiscord/dsc.gg

NPM Package Version Size

A node js wrapper for dsc.gg

To use this package, you need to create a developer app here and grab the API token. This token is required for all API requests.

Docs Site

Install instructions

Install with NPM

npm install @helperdiscord/dsc.gg

Install with Yarn

yarn install @helperdiscord/dsc.gg


Getting Started

Initilize the @helperdiscord/dsc.gg client

const { Client } = require("@helperdiscord/dsc.gg");

const client = new Client("Your API token")

Client Functions

Fetch information on a dsc.gg link

const link = await client.getLink('link_ending')

Fetch information on a dsc.gg user

const user = await client.getUser('user_id')

Fetch a dsc.gg user's links

const links = await client.getUserLinks('user_id')

Fetch the top dsc.gg links

const top_links = await client.getTopLinks()

Search for dsc.gg links

const results = await client.searchLinks('search_query', {
    type: 'bot', //optional - can be bot, server, or template
    limit: 10, //optional - limit the # of results that will be returned
})

Create a dsc.gg link

const response = await client.createLink('link_ending', {
    type: 'server', //this can be server, bot, template or link
    redirect: 'something', //the redirect of the link
    unlisted: false, //true or false
    password: 'some_password', //optional - exclude this for no password
    meta: {
        title: 'some embed title', //optional
        description: 'some embed description', //optional
        image: 'some image url' //optional
    }
})

Update a dsc.gg link

const response = await client.updateLink('link_ending', {
    type: 'server', //this can be server, bot, template or link
    redirect: 'something', //the redirect of the link
    unlisted: false, //true or false
    password: 'some_password', //optional - exclude this for no password
    meta: {
        title: 'some embed title', //optional
        description: 'some embed description', //optional
        image: 'some image url' //optional
    }
})

Delete a dsc.gg link

const response = await client.deleteLink('link_ending')

Full Example

Search for links from a given input

const {Client} = require('./dist/index');
const c = new Client('token');
(async () => {
  const r = await c.searchLinks('helper', {type: 'bot'});
  console.log(r);
})();

FAQs

Package last updated on 24 Mar 2021

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc