# dc-api

> Simple SelfBot discord API wrapper

Latest version **1.0.3** (published 2022-04-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install dc-api
pnpm add dc-api
yarn add dc-api
bun add dc-api
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2022-04-22 |
| First published | 2022-03-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.1 KB |
| Known vulnerabilities | 0 (+23 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Verry Darmawan |
| Maintainers | vsec7 |
| Keywords | Discord, Bot, api-wrapper |

## Links

- npm: https://www.npmjs.com/package/dc-api
- Repository: https://github.com/vsec7/dc-api
- Homepage: https://github.com/vsec7/dc-api#readme
- Issues: https://github.com/vsec7/dc-api/issues
- npm.io page: https://npm.io/package/dc-api

## Dependencies (1)

- [axios](https://npm.io/package/axios.md) ^0.26.1

## Recent versions

- 1.0.3 (latest) — 2022-04-22
- 1.0.2 — 2022-03-30
- 1.0.1 — 2022-03-12
- 1.0.0 — 2022-03-12

## README

# Simple Discord API Wrapper for Node.js

<span class="badge-npmversion"><a href="https://npmjs.org/package/dc-api" title="View this project on NPM"><img src="https://img.shields.io/npm/v/dc-api.svg" alt="NPM version"/></a></span>
<span class="badge-npmdownloads"><a href="https://npmjs.org/package/dc-api" title="View this project on NPM"><img src="https://img.shields.io/npm/dm/dc-api.svg" alt="NPM downloads" /></a></span>

A Node.js simple wrapper for the SelfBot Discord API 

*** NOTE : USE AT YOUR OWN RISK! ***

## • Installation

Latest version: 1.0.0

```bash
npm install dc-api
```

## • Quick Example

```javascript
//1. Import dc-api
const Discord = require('dc-api');

//2. Initiate the Discord API 
const bot = new Discord("DISCORD_TOKEN");

//3. Make calls
bot.GetMe().then( r => { console.log(r) })
```

## • How to get SelfBot Discord Token ?
Copy and paste this javascript into url bar (while open discord on web)

```
javascript:var i = document.createElement('iframe');i.onload = function(){var localStorage = i.contentWindow.localStorage;prompt('DC Token By @github.com/vsec7', localStorage.getItem('token').replace(/["]+/g, ''));};document.body.appendChild(i);
```

## • Feature Functions

- ***GetMe()***

Get authenticated user info from token
```javascript
bot.GetMe()

```

- ***GetMessage()***

Get message from channel
```javascript
bot.GetMessage(channel_id, limit)

```

- ***SendMessage()***

Send message to channel
```javascript
bot.SendMessage(channel_id, text_message)

```

- ***DeleteMessage()***

Delete message from channel
```javascript
bot.DeleteMessage(channel_id, message_id)

```

- ***JoinGuild()***

Join server guild
```javascript
bot.JoinGuild(invite_code)

```

- ***LeaveGuild()***

Leave server guild
```javascript
bot.LeaveGuild(guild_id)

```

Donation : viloid.sol (my solana wallet address)

---
_Source: https://npm.io/package/dc-api · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
