# discord-scraper

> Discord scraper in node.js, works for guild members. Currently making more types.

Latest version **2.1.1** (published 2022-02-04) · ISC license · 0 weekly downloads

## Install

```sh
npm install discord-scraper
pnpm add discord-scraper
yarn add discord-scraper
bun add discord-scraper
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.1 |
| Published | 2022-02-04 |
| First published | 2022-02-04 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 28.9 KB |
| Known vulnerabilities | 0 (+23 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Hima |
| Maintainers | himatric |
| Keywords | discord, scraper, memberscraper, node, discordmembers |

## Links

- npm: https://www.npmjs.com/package/discord-scraper
- Repository: https://github.com/Himatric/Discord-Scraper
- Homepage: https://github.com/Himatric/Discord-Scraper#readme
- Issues: https://github.com/Himatric/Discord-Scraper/issues
- npm.io page: https://npm.io/package/discord-scraper

## Dependencies (2)

- [ws](https://npm.io/package/ws.md) ^8.4.2
- [axios](https://npm.io/package/axios.md) ^0.25.0

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 2.1.1 (latest) — 2022-02-04
- 2.1.0 — 2022-02-04
- 2.0.2 — 2022-02-04
- 2.0.1 — 2022-02-04

## README

# Discord Scraper #


## Installation ##
```bash
npm i discord-scraper
```

## Usage ##

```js
const { Scraper } = require("discord-scraper")
const scraper = new Scraper({token: "token", channelID: "channel id in guild", guildID: "guild id", outputFile: "path"})
//output file is not neccesary but it would write all the IDS of the scraped members to the file

scraper.on("fetched", (members) => {
    // returns map of Member Objects
    console.log(members.size)
})
scraper.on("ready", (event) => {
    event.users // fetched users
    event.user // client user
    event.relationships // client relationships
})
scraper.scrape()
```

## Member Object ##
```js
{
    "user": {
        "username": String,
        "id": Snowflake,
        "discriminator": String,
        "avatar": String,
        "avatarURL": Function
    },
    "roles": Snowflake[],
    "presence": {
        "user": {
            "id": Snowflake,
        },
        "status": String,
        "activities": Array
    },
    "mute": Boolean,
    "joined_at": <ISO8601 timestamp>,
    "deaf": Boolean
}
```

## About ##

Might be updated idk\
Note: this will only get every ONLINE member.\
It's basically like scrolling down the memberlist in a guild.

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