19 Commits
Author SHA1 Message Date
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 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
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
bsian03 80a8b894b4 Remove all user account features (PR 1338) 2022-09-16 12:32:41 +00:00
e194a71c0f REST v8, Gateway v8 (#1038)
Co-authored-by: macdja38 <jakeincanada@icloud.com>
Co-authored-by: bsian03 <chharry321@gmail.com>
Co-authored-by: abalabahaha <hi@abal.moe>
2021-07-13 04:04:21 -07:00
abalabahaha ff8d90153a Lint, add recent props to toJSON() 2021-04-04 02:48:48 +00:00
Khaaz c149e737df Expose new props in GuildIntegration (#1031) 2021-03-24 17:42:57 -07: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
Apacheli d67880d8b7 Unify toJSON() logic (#570) 2019-11-25 15:17:23 -08:00
abalabahaha ed3997020d Fix toJSON on structures
Actually exclude undefined props while keeping falsy props

94019f1/#400 made some bad assumptions about order of operations
2018-08-02 18:04:10 -07:00
LJ 2ddfd2d6d8 Upgrade to Node 8 (#408)
Finally.

Closes #402
2018-08-02 01:01:59 -07:00
George 94019f1f5f Fix falsy properties on inspect/toJSON methods (#400)
* Don't omit falsy values from structure inspection

Also fixes an issue with toJSON for messages having a typo'd prop name

* Fix Message#editedTimestamp being NaN
2018-07-15 17:31:28 -07:00
abalabahaha cbd4674d67 Make everything important toJSON()able (fix #288)
Without circles!

There's probably a million better ways to do this. If you have one, please suggest it in the Discord
2017-10-08 17:12:54 -07:00
abalabahaha 71b3d7f302 toJSON/inspect methods 2016-10-23 03:58:26 +09:00
abalabahaha fa874e2484 s/apply/call 2016-09-11 09:49:44 +09:00
abalabahaha b164257186 Fix up aliases 2016-09-11 08:56:18 +09:00
abalabahaha 840c906033 Linting errors 2016-09-11 05:57:53 +09:00
abalabahaha dc164215a2 Class-based method aliases 2016-09-11 05:50:57 +09:00
abalabahaha 8271cbcd78 Refactoring, experimental sequential ratelimit header support 2016-08-20 14:33:44 +09:00