59 Commits
Author SHA1 Message Date
TTtie e5c36970d4 docs: add is_spoiler, waveform, and duration_secs to attachment upload structure (#252)
Ref:
https://github.com/discord/discord-api-docs/commit/bea2305a9094163f59ac7cf86c4c1f3bd05f73d2
2026-07-15 02:28:21 +00:00
TTtie b22fdc24ad chore: remove v0.2.x deprecations (#239) 2026-04-07 12:15:41 +02:00
TTtie bf2cb84372 feat: community invites (#233)
Ref:
https://github.com/discord/discord-api-docs/commit/e6b6aa6df939ddb1636863c62a97f5ca5db1ba25
2026-03-11 13:05:54 +01:00
TTtie bd7da84008 feat: support paginated pins (#207)
To not break compatibility with existing 0.2.x releases, this is exposed only if an options object is passed. In 0.3.x, the options object will become optional and the "new" form will be returned.

Ref:
https://github.com/discord/discord-api-docs/commit/404b074d08cd36ec21ab3c0d7ba7673a4a7e874a
Ref:
https://github.com/discord/discord-api-docs/commit/8ef03803f28fd93ce5970225266abab9e7b2aa6c
2025-07-01 00:05:45 +00:00
TTtie 1294a20b42 feat: support message forwarding (#144)
Adds message forwarding support to Dysnomia. Going purely by the metric of "it doesn't crash", receiving forwarded messages should work just fine, sending forwards still results in a 403 on my side but should work just fine.

Thanks to @MertBhey for forwarding a couple messages over for testing!

Ref: https://github.com/discord/discord-api-docs/commit/86641ea0
2024-08-04 14:08:42 +00:00
TTtie dc3129e2a4 refactor: switch to ESLint flat config, add JSDoc linting (#147)
This commit switches Dysnomia over to ESLint flat config for
futureproofing and better maintainability. For the most part, the
codebase will pass the test suite, apart from a few exceptions
introduced by the stylistic plugin which I believe are reasonable to
include.

Additionally, JSDoc linting was added to maintain proper 
alignment of various features.
2024-08-02 18:56:44 +00:00
TTtie b8f1f61fbe feat: support polls (#139)
For the time being, poll results are only cached when the poll tally is finalized. If there's a need for caching interim results, please, send a PR.

* feat: support polls

Ref: https://github.com/discord/discord-api-docs/commit/df7d3652

* feat(Shard): add basic poll WS event processing

* types: add basic poll typings

* lint: sort methods correctly

* fix!: PollTypes -> PollLayoutTypes

* types: add typings for poll objects

* lint

* fix(types): poll create object doesn't have an answer_id in answers

* fix(types): remove invalid `after` option from `GetPollAnswerVotersOptions`

* fix(types): wait, this is actually here twice, for whatever reason

* fix(types): fix-up merge

* fix(types/docs): answerID is not a string

* fix(docs/types): also use Number for answerID in getPollAnswerVoters

* refactor!: put answerID before user in poll vote events
2024-07-19 14:14:57 +00:00
TTtie 731b624173 feat: super reactions (#107)
* feat: super reactions

Ref: https://github.com/discord/discord-api-docs/commit/b1bed4665ab0855cd3265fa3617a05bf7a51b353

Ref: https://github.com/discord/discord-api-docs/pull/6375

* fix ts lint

* feat: allow getting reactions by type over REST

* refactor: move the reaction object references to a variable
2024-07-13 12:22:58 +00:00
TTtie bbf3a8b47d feat: support nonce/enforceNonce when creating messages (#128)
* feat: support `nonce`/`enforceNonce` when creating messages

* reword Message#nonce docs

* lint

* types: nonces aren't editable
2024-03-16 14:36:28 +00:00
TTtie 528695abf6 docs: convert inline @prop to actual class members (#113)
this should introduce proper jsdoc inheritance and make it slightly more convertible
also unifies the cases when the docs would be written directly on the class field

* stage 0.5: move all props (almost) everywhere to their own blocks

* convert a couple more structures

* remove stray Guild import

* convert SharedStream, VoiceConnection

* convert Message structure
2023-09-28 20:43:18 +00:00
TTtie 6d1a608afd fix(TextChannel,VoiceChannel): reintroduce nsfw property (#112)
Probably accidentally removed while merging an upstream PR, I think this should cover all the NSFW-able channel types.
2023-09-25 05:44:41 +00:00
TTtie f417daf94b refactor(Channel): make the client private (#58)
Makes Channel#client a private property. Brace for impact, this might introduce regressions.
2023-09-23 21:06:04 +00:00
TTtie aed90232e4 refactor: don't call update() multiple times in the prototype chain (#91)
The update() method is already called in the base class - according to JS class semantics, when calling a constructor via `super`, `this` still points to the object at the top of the prototype chain, resulting in the update() method being called twice or more down the prototype chain as the super-classes initialize.
2023-07-27 22:56:27 +00:00
TTtie 8340a40144 chore: set version to 0.2.0-dev, remove deprecated APIs (#40)
* chore: set package.json version to 0.2.0-dev

* chore: remove deprecated APIs
2023-03-06 14:44:40 +00:00
TTtie 9aadd153c8 chore: normalize embeds (#36)
Settled down on using the `embeds` array instead of `embed` – `embed` will no longer be accepted.
2023-03-01 21:01:32 +00:00
TTtieandWilsontheWolf 0df1369a82 chore: pre-v0.1.0 housekeeping (#26)
* add pull request CI

* forgot to checkout the repository :(

* do not fail fast on CI

* deprecate the default export function call

* correct invalid jsdoc

* add guildAuditLogEntryCreate event

* Add deprecation notices to examples using deprecated interfaces

* Add missing deprecation comment to esm.mjs

* export ForumChannel on the main module

* Update flags and interfaces related to OAuth application data

This also includes deprecation of undocumented flags

* fix linting

* fix incorrect invite object construction in GuildAuditLogEntry#target

* update audit log-related interfaces to reflect the current API status

* promote AutoModerationRule to a class; update appropriately

* fix(Client): whoops, return AutoModerationRule in editAutoModerationRule

* Add support for Member#flags

ref: https://github.com/discord/discord-api-docs/commit/5a6c4e10858ae736b09d352b67387a096b4adcdb

* Support GuildChannel#permissions

Available only on channels received on the interaction resolve object

* docs: VoiceChannel#topic does not exist

* add GUILD_DIRECTORY into ChannelTypes enum

* Update the Message interface

* Document ability to use flags when creating a message

* Support rateLimitPerUser in createThreadWithMessage

* correctly sort the Message#thread property

* deprecate/get rid of undocumented guild features

server discovery and hub types are undocumented

* correct getGuildPreview return

* update Guild#toJSON after removal of discovery fields

* support GuildPreview#stickers

* Support GuildIntegration#scopes

* support passing systemChannelFlags to createGuild()

* support editing Guild#premiumProgressBarEnabled

* support rtcRegion and videoQualityMode in createChannel()

* sort endpoints appropriately

* Support editing the guild's MFA level

* return the new MFA level directly

* correctly sort GuildScheduledEvent properties in the doc

* Deprecate undocumented scheduled event constants

* Support fetching event data in getInvite()

* Support associated event data with StageInstance

* Update docs related to stage instance privacy levels

* Support sendStartNotification in createStageInstance

* emit deprecation on getInvite(invID, withCounts, withExpiration)

* SticketPack banner_asset_id is optional

* feat(MessageFlags): add `SUPPRESS_NOTIFICATIONS` message flag (#30)

* Add the new `SUPPRESS_NOTIFICATIONS` message flag

This adds the new `SUPPRESS_NOTIFICATIONS`, as mentioned in https://github.com/discord/discord-api-docs/pull/5910/files

* Update TS definitions

---------

Co-authored-by: TTtie <me@tttie.cz>

* support creating new threads in a forum via webhooks

* remove handling of private_channels on READY

it's been an empty array for bots since 2018, not present in the docs anymore

* add old default forum layout to channel updates

* include components and remove mentionedBy from messageUpdate

* emit possibly uncached guilds in guildBan{Add,Remove} events

* use PossiblyUncached* types consistently

* feat(GuildIntegration): add scopes to toJSON()

* document GuildIntegration#guild

* Support guild integration gateway events

* Support text-in-stage

* doc(Client): specify getGuildAuditLog return type

* quote dev branch install command
# is a comment in some shells

---------

Co-authored-by: WilsontheWolf <33164598+WilsontheWolf@users.noreply.github.com>
2023-02-16 21:07:46 +00:00
TTtie b3fda218d0 feat: forum support (#1)
I believe this should be enough to ensure full forum support. Although, some things might've been missed out by accident.
2022-11-28 06:25:54 +00:00
TTtie 44562550cb feat: modern file uploading (#5) 2022-10-23 11:21:54 +00:00
TTtie 75d58b787e chore: remove deprecated/dead code (#3) 2022-10-14 14:49:37 +00:00
Alex 2c33417239 feat: API v10 (PR 1371) 2022-10-06 20:25:15 +00:00
Donovan Daniels 91d29f9157 refactor: Overall Consistency Fixes & Minor Feature Additions (PR 1379) 2022-10-06 20:15:34 +00:00
Donovan Daniels 61b9502d18 refactor(interactions): Interactions Refactor (PR 1309) 2022-09-16 13:51:52 +00:00
bsian03 80a8b894b4 Remove all user account features (PR 1338) 2022-09-16 12:32:41 +00:00
abalabahaha dc72ad97f2 Normalize interaction response/message creating/editing
- Accept/Un-deprecate `embed` where `embeds` is accepted
- Copy-paste docs around (we should use aliases at some point)
2021-11-15 01:26:18 +00:00
3fe4d216ca Support Discord API v9 (#1279)
Co-authored-by: Donovan Daniels <hewwo@yiff.rocks>
Co-authored-by: iiFDCT <35053522+iiFDCT@users.noreply.github.com>
Co-authored-by: Lava <service.github@lava.moe>
Co-authored-by: abalabahaha <hi@abal.moe>
2021-11-13 23:06:57 -08:00
daedb2b416 Sticker Sending (#1252)
Co-Authored-By: Catboy <elijahchristopherjohnson@gmail.com>
Co-authored-by: bsian03 <chharry321@gmail.com>
2021-09-02 22:40:24 +01:00
120f917c0f Expose components (#1189)
Co-authored-by: HeadTriXz <32986761+HeadTriXz@users.noreply.github.com>
Co-authored-by: HeadTriXz <32986761+HeadTriXz@users.noreply.github.com>
Co-authored-by: Tsumari <lucasflicky@hotmail.com>
Co-authored-by: Catboi <50190590+Catboi8@users.noreply.github.com>
2021-08-19 13:05:33 +01:00
Reinhardt 8e9a2b7528 Support sending multiple embeds (#1239) 2021-07-13 03:34:33 -07:00
abalabahaha ec777a1acb Move paginated request params to options object 2021-05-02 22:14:14 +00:00
bsian03andabalabahaha c3d491d4d7 Move to content.messageReference (#1187)
Co-authored-by: abalabahaha <hi@abal.moe>
2021-04-25 08:48:37 -07:00
bsian03 3e86cd78a2 Deprecate getMessageReaction() before param (#1180) 2021-04-25 13:55:48 +00:00
bsian03 5936086bd3 Support inline replies (#1069) 2020-11-29 05:49:04 -08:00
bsian03 b5a33f283d Mark avatar as optional for createWebhook() (#1055) 2020-11-29 05:14:16 -08:00
814f92b813 Documentation tidyup/updates (#993)
Co-authored-by: jtsshieh <27078349+jtsshieh@users.noreply.github.com>
Co-authored-by: Donovan Daniels <dwddaniels262@gmail.com>
Co-authored-by: Geo <georgej1088@gmail.com>
2020-10-23 09:23:08 -07:00
LJ 69195fc429 Update Discord URL (#932) 2020-10-23 09:05:20 -07:00
KhaaZ 8231537d87 Support Allowed Mentions in editMessage (#902) 2020-04-15 18:28:34 -07:00
Sei 67ab33f53a Allow reason parameter in TextChannel methods (#669) 2020-04-01 04:06:44 -07:00
LJ ebce8ddd2f Support Allowed Mentions (#649) 2020-03-18 22:26:26 -07:00
Skillz4Killz c7c4d9d6b0 Support deleting a single reaction (#631) 2020-02-29 04:32:07 -08:00
Alex Taxiera 76aa6ec7be Clarify temporary invite docs (#638) 2020-02-08 09:12:59 -08:00
LJ ba0f2bff03 Expose Channel#client (#622) 2020-01-20 03:38:37 -08:00
Apacheli 07ba8f2426 Add curly linter rule (#581) 2019-11-30 17:46:45 -08:00
Apacheli d67880d8b7 Unify toJSON() logic (#570) 2019-11-25 15:17:23 -08:00
KhaaZ 1567f9de1f Document editing message flags (#567) 2019-11-23 13:04:59 -08:00
KhaaZ 3bdeb5b03b Conditionally update struct properties (#568) 2019-11-23 13:02:23 -08:00
Apacheli#6009 236dbf4ba9 Add Channel.from() helper (#565) 2019-11-23 12:33:48 -08:00
Tyler Ricketts 247092d721 NewsChannel (type 5) Support (#472) 2019-04-19 03:27:52 -07:00
abalabahaha df409874a6 Guard against unknown text-like channel types 2019-03-07 22:20:50 -08:00
Moto c6a6ab7a83 Properly update rateLimitPerUser (#424)
* Add rateLimitPerUser to update()

* Add rateLimitPerUser to oldChannel in Channel update

* Fix my mistake

super.update to super.update(data)
oops

* Undefined Check
2018-10-12 02:47:51 -07:00
abalabahaha 0e06348f15 Add rateLimitPerUser property to guild text channels 2018-09-19 16:00:09 -07:00