* feat(structures): presence structures * feat(structures): add GatewayPresenceActivityTimestamps substructure * feat(structures): add GatewayPresenceActivitySecrets * feat(structures): add GatewayPresenceActivityParty * feat(structures): add GatewayPresenceActivityEmoji * feat(structures): add GatewayPresenceActivityButton * feat(structures): add GatewayPresenceActivityAssets * feat(structures): add ActivityFlagBitFields * feat(structures): add GatewayPresenceActivity structure * docs(structures): update class remark on GatewayPresenceActivityButton * feat(structures): add GatewayPresenceClientStatus * feat(structures): add GatewayPresenceUpdate * docs(structures): update `GatewayPresenceActivity#flags` for clarity * fix(structures): return correct value for getter on ActivitySecrets * test(structures): add tests & use correct type on ActivityTimestamps * docs: rm todo comment * fix: correct incorrect implementation of party#id * chore: rename structures * feat(structures): update tests, comments, date getters * feat: split `size` into 2 different getters * test: update tests for new getters * refactor(structures)!: use xDate convention in favour of xAt * fix(structures): add `inviteCoverImage` getter + update tests * test(structures): apply review feedback * chore: use `dateToDiscordISOTimestamp` and cleanup tests * feat: isArrayFieldSet typeguard & tidy up * feat(structures): add URL getters, typeguards, update tests * test(presence): review feedback * test(presence): use realistic values This uses values from the Discord API docs. * test: rename tests to Presence instead of GatewayPresence * test(structures): review feedback * docs: use new discord docs links in jsdoc * fix: address feedback for tests Make some changes to all tests; - use a standard beforeEach block to use a new instance on each test for robustness; - check that the patched result contains the expected patched values as opposed to testing for any change across the structure, for accuracy.
About
This repository contains multiple packages with separate releases. You can find the assembled Discord API wrapper at discord.js. It is a powerful Node.js module that allows you to easily interact with the Discord API.
Packages
discord.js(source) - A powerful Node.js module for interacting with the Discord APIcreate-discord-bot(source) - A CLI tool to quickly scaffold a Discord bot project@discordjs/brokers(source) - A collection of brokers for use with discord.js@discordjs/builders(source) - A utility package for easily building Discord API payloads@discordjs/collection(source) - A powerful utility data structure@discordjs/core(source) - A thinly abstracted wrapper around the core components of the Discord API@discordjs/formatters(source) - A collection of functions for formatting strings@discordjs/proxy(source) - A wrapper around@discordjs/restfor running an HTTP proxy@discordjs/rest(source) - A module for interacting with the Discord REST API@discordjs/rpc(source) - A simple RPC client for Discord@discordjs/structures(source) - A wrapper around Discord's structures@discordjs/util(source) - A collection of utility functions@discordjs/voice(source) - A module for interacting with the Discord Voice API@discordjs/ws(source) - A wrapper around Discord's gateway
Containers
discordjs/proxy(source) - A lightweight HTTP proxy for Discord's API
Links
- Website (source)
- Documentation
- Guide (source) Also see the v13 to v14 Update Guide, which includes updated and removed items from the library.
- discord.js Discord server
- Discord Developers Discord server
- GitHub
- npm
- Related libraries
Contributing
Please read through our contribution guidelines before starting a pull request. We welcome contributions of all kinds, not just code! If you're stuck for ideas, look for the good first issue label on issues in the repository. If you have any questions about the project, feel free to ask them on Discord. Before creating your own issue or pull request, always check to see if one already exists! Don't rush contributions, take your time and ensure you're doing it correctly.
Help
If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please join our Discord server.