Commit Graph

16 Commits

Author SHA1 Message Date
1Computer1
19c298f5cc refactor: rewrite message creation (#2774)
* Rework createMessage
- MessageAttachment is now structurally similar to FileOptions
- No longer mutates the object passed as options
- Supports more permutations of arguments

* Ignore complexity warning

* Refactor name finding

* Fix typo

* Update typings

* Default name to null for MessageAttachment

* Make Message#reply use transformOptions

* Move transformOptions

* Fix Message#reply

* Fix mutation

* Update tests

* Fix options passing

* Refactor into APIMessage

* Fix webhook send

* Expose APIMessage

* Add documentation

* Add types

* Fix type doc

* Fix another type doc

* Fix another another type doc (is this one even right!?)

* Remove trailing comma

* Properly clone split options

* Add support for sending file as stream

* Missed a doc

* Resolve files only once when splitting messages

* This looks nicer

* Assign directly

* Don't cache data and files

* Missing return type

* Use object spread instead Object.assign

* Document constructors

* Crawl is a little dot

* comp pls

* tests: sanitize local file path, disable no-await-in-loop
2018-08-21 18:22:29 +02:00
SpaceEEC
55c58b60e7 typings: fix PermissionResolvable typedef, allow resolving of Readonly<BitField<T>> 2018-08-21 16:12:01 +02:00
bdistin
c62f01f0e4 refactor(BitField): base class for Permissions, ActivityFlags, Speaking (#2765)
* abstract BitField from Permissions

* reduce useless code, improve docs

* add a ReadOnly identifier to the return type of Bitfield#freeze()

https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-1.html#partial-readonly-record-and-pick

* fix the RangeError

* update docs, convert Speaking and ActivityFlags to bitfields

* fix some docs

* Fix Speaking BitField oops

* docs for oops

* more incorrect docs

* Fix incorrectly named property

* add new classes to index

* fix missing @extends docs

* default bitfield resolve to 0, and cleanup defaulting everywhere

Also removes GuildMember#missiongPermissions() alias that had incorrect behavior

* Breaking: Rename Overwrite allowed and denied to allow and deny

To be consistent with the api's naming

* fix setSpeaking usage to bitfields instead of booleans

* fix speaking bug in playChunk

* docs: Updated typings

* fix: BitFieldResolvable should use RecursiveArray

* bugfix/requested change

* typings: Cleanup (#2)

* typings: Fix BitField#{toArray,@@iterator} output type

* typings: correct PermissionOverwrites property names and nitpicks
2018-08-21 11:56:41 +02:00
Kyra
6be8172539 misc: add UNKNOWN_WEBHOOK error code (#2775)
* Add UNKNOWN_WEBHOOK error code

* docs: Update typings
2018-08-21 10:41:42 +02:00
Kyra
5787deef26 feat: GuildEmbed support (#2766)
* feat: Guild embed support

* docs: Fixed setEmbed's reason argument not being optional

* fix: Guild#setEmbed should return the guild itself for consistency

* docs: Updated typings

* fix: Requested change
2018-08-21 10:40:47 +02:00
Frangu Vlad
0401b8ad77 feat: handle and forward WEBHOOKS_UPDATE events (#2762)
* src: Handle WEBHOOK_UPDATE events

* Commit rename of 77'
Or adding the letter S

* I missed this

* Properly do this now
Typos everywhere

* Typings

* refactor: remove now unnecessary guild variable
2018-08-21 10:38:35 +02:00
SpaceEEC
7546ca3fe0 typings(Guild): add fetchVanityCode
PR: #2732
Commit: f8057b01cb
2018-08-18 17:22:57 +02:00
SpaceEEC
e7ee8d21d7 typings: VoiceState is extendable 2018-08-18 11:07:48 +02:00
SpaceEEC
58ce08255f typings: remove UserFlags and ClientApplicationCreateAssetsOptions
Leftover user bots declarations
2018-08-18 11:07:29 +02:00
SpaceEEC
c966aa2457 typings(VoiceRegion): remove no longer existing sampleHostname 2018-08-18 10:58:29 +02:00
zajrik
5fdd3a5877 tests(lint): Fix typings lint errors 2018-08-17 23:38:54 -05:00
SpaceEEC
6841b4e66a typings(VoiceConnection): receivers is now receiver and no longer an array
PR: N/A
Commit: e2726f5a9a
2018-08-17 16:58:41 +02:00
SpaceEEC
5942e8becc typings: remove user bots
PRs: #2559 #2758
Commits:
 - 5afd77ab73
 - 4999f675cd
2018-08-17 16:55:23 +02:00
SpaceEEC
9a95b6a1e8 typings(Client): voiceStateUpdate now always has an old state
PR: N/A
Commit: 38597de271
2018-08-15 15:05:13 +02:00
SpaceEEC
9b5df571b3 refactor: typings for voice state and presences refactor
Commits: ea4375bf90...e0f52162ea
PR: N/A
2018-08-14 20:29:13 +02:00
zajrik
1ff56eb09d Merge typings into master 2018-08-13 20:51:41 -05:00