Commit Graph

997 Commits

Author SHA1 Message Date
Isabella
183ba25faf fix: emit voiceStateUpdate on guildMemberRemove (#2892)
* fix: emit voiceStateUpdate on guildMemberRemove

* apparently i am blind

* typings
2018-10-14 12:44:14 -05:00
Amish Shah
2e7094f9ea voice: fix disconnect without receiver edge case 2018-10-11 23:02:59 +01:00
Amish Shah
00a62a93e4 voice: catch errors before connection is ready 2018-10-04 20:57:52 +01:00
SpaceEEC
6b810b2331 fix(ClientPresence): use possibly extended constructor from structures 2018-10-04 12:36:25 +02:00
bdistin
96a0655609 refactor(WebhookClient): make token property non-enumerable (#2861)
* make WebhookClient#token non-enumerable

parity with Client to add the barest protection against accidental exposure

* requested change
2018-10-01 12:43:08 +02:00
bdistin
d8c97be142 docs: fix typos (#2868) 2018-10-01 12:38:36 +02:00
Shayne Hartford
32b405a5be Change default token (#2843)
* Change default token

Default `token` to `process.env.CLIENT_TOKEN` like client does.

* 2/2

* 1/2
2018-09-23 21:36:28 +02:00
SpaceEEC
d2da771e0f docs(Client): fix syntax error in fetchInvite example 2018-09-18 11:04:54 +02:00
Ash
9c2924a1b4 docs(ChannelPinsUpdate): clarify time param (#2823) 2018-09-05 14:33:44 +02:00
Ash
e96a60361a feat(TextBasedChannel): add lastPinTimestamp and lastPinAt (#2813)
* add lastPinTimestamp

* typings

* use or instead of ternary
2018-09-03 09:11:52 +02:00
Isabella
be4d6f9dc3 feat: add ClientOptions#retryLimit (#2805)
* feat: add ClientOptions#retryLimit

* hydra needs to learn how to code right

* a default would probably help

* move incrementor & update comment

* clarify docs on Infinity
2018-09-01 04:51:35 +02:00
lipgloss
9c2aeb733a fix: private_channels always returns an empty array on ready (#2787) 2018-08-26 13:06:00 -05:00
Amish Shah
6f62d7d816 fix: voice not throwing errors on bad stream input (#2786) 2018-08-25 19:41:07 +01:00
Kyra
c4df02782e feat: Guild Integrations (#2760)
* feat: Guild Integrations

* feat: Guild#createIntegration

* feat: Add ws event GUILD_INTEGRATIONS_UPDATE

* docs: Add `GUILD_INTEGRATIONS_UPDATE` to WSEventType

* misc: Fixed requested change

* docs: Updated typings

* typings: Sort members by name
2018-08-24 16:03:29 +02:00
Isabella
928fb30040 fix: actually fix Readonly typos 2018-08-21 14:25:30 -05: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
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
Frangu Vlad
94214fa733 misc: Remove Clyde (#2764)
* Remove Clyde

* Remove Clyde avatar overwrite

* Remove Clyde from the user pattern
2018-08-18 13:21:24 +02:00
Frangu Vlad
e935611e50 fix(GuildBanAddHandler): not emitting guildBanAdd for uncached users (#2763) 2018-08-18 10:53:23 +02:00
Amish Shah
e2726f5a9a voice: remove createReceiver, just use VoiceConnection.receiver 2018-08-16 18:30:54 +01:00
Amish Shah
97c34b5b6f voice: clean up packet handling 2018-08-16 11:28:28 +01:00
Amish Shah
64832abfdb voice: clear connect timeout after connected (fixes #2752) 2018-08-15 14:25:47 +01:00
Amish Shah
38597de271 voice: patch in default VoiceStateUpdate in case on doesn't exist, cache member 2018-08-15 14:02:11 +01:00
bdistin
6506252054 fix/refactor: fix GuildMember#presence getter and cleanup (#2751)
* Fix guild being a guild and not an AbstractHandler in PresenceUpdate

* update the default guild to be a Guild, and not GuildMember

* getters return null instead of undefined

* fix lint
2018-08-15 08:50:22 +02:00
Kyra
75254748b1 fix(Client): do not redefine _timeouts and _intervals of BaseClient (#2748)
Fixes an issue with the process permanently hanging.
2018-08-14 20:39:56 +02:00
Amish Shah
e0f52162ea voice: allow for streaming silence to avoid audio glitches with repeated pausing/resuming (#2354) 2018-08-14 12:12:59 +01:00
Amish Shah
6852a15cee voice: fix StreamDispatcher#pause trying to call null function 2018-08-13 17:54:11 +01:00
Amish Shah
bfde1dd8f2 fix: StreamDispatcher doesn't emit finish if ended while paused (#2648) 2018-08-13 17:35:21 +01:00
Amish Shah
ea764afad2 add ClientPresence, remove ClientPresenceStore 2018-08-11 10:46:51 +01:00
Amish Shah
34ed3c6014 Update documentation for presenceUpdate 2018-08-10 17:09:05 +01:00
Amish Shah
08eff66939 Make presences track users and guilds, emit them in presenceUpdate 2018-08-10 16:46:14 +01:00
Amish Shah
fe8ece0192 voice state fixes 2018-08-10 15:15:52 +01:00
Amish Shah
be5efea461 rewrite voice state handling 2018-08-10 14:44:59 +01:00
Amish Shah
ee6c19ca7e voice: rewrite GuildMember#speaking tracking (#2540) 2018-08-09 13:59:52 +01:00
Amish Shah
55863efa15 voice: don't clear reject timeout until connection fully resolved (#2421, #2578) 2018-08-09 13:00:46 +01:00
Amish Shah
46fa9603c2 voice: delete receive stream immediately to prevent it being written to after end (#2678) 2018-08-07 17:34:01 +01:00
bdistin
5afd77ab73 refactor: remove user bot methods (#2559)
* [WIP] Remove user bots

* more backend userbot removal

* Add mfaEnabled back

* revert client presences store removal

* partially revert getAuth changes

* remove more no longer used children of ClientUserGuildSettings

* fix a bug with this pr and TextBasedChannel.applyToClass

* remove a syncGuilds reference

* more user bot data handling

* various guildSync cleanup

* bots can't call logout

Had the user/bot portions of the code mixed up. Though, does this need to be a promise anymore?

* make ClientManager#destroy() sync

It nolonger needs to be a promise, and nothing depended on it being a promise that I can tell.

* requested change

* Fix massive error

* no longer used as it's userbot only
2018-07-25 22:14:23 -04:00
Gymnophoria
717e7f094a docs(Client): clarify messageReactionRemove event's user description (#2657)
* Clarify messageReactionRemove user description

* Update MessageReactionRemove.js

* wait one more word difference lol
2018-07-18 11:41:05 +02:00
Lewdcario
92e2c3c7fd fix: instantiate constructors before using those properties 2018-06-29 15:12:52 -05:00
FireController1847
ac0c15f7f1 Change ytdl example (#2619) 2018-06-24 15:47:54 +02:00
Mikhail
bf738b34de fix(BasePlayer): incorrectly mutating FFMPEG_ARGUMENTS when using seek (#2622)
Because args was not a copy of FFMPEG_ARGIMENTS, but a reference to it, pushing 'ss' argument pushed it to FFMPEG_ARGUMENTS, making it persistent.
2018-06-23 15:20:59 +02:00
Amish Shah
18646b72f9 voice: use getters where possible 2018-06-22 18:46:51 +01:00
Amish Shah
08bbbe9301 voice: handle new client_connect and client_disconnect packets 2018-06-22 18:38:33 +01:00
Amish Shah
9296a30148 voice: account for speaking now being a bitmask 2018-06-22 17:47:00 +01:00
Amish Shah
1f7c1ddaa2 voice: start update to v4, fix heartbeats 2018-06-22 17:42:04 +01:00
Amish Shah
3d41748a38 voice: fix not passing volume to transform constructor 2018-06-21 21:50:54 +01:00
Camzure
9997a67ab6 Docs: Wording Improvements (#2607)
* wording improvement

* wording improvement for docs

* docs: wording

* wording

* user account only: docs

* Edited

* Edited
2018-06-21 21:35:52 +02:00
Amish Shah
1cdee7b48a voice: reimplement seek option (#2572) 2018-06-13 21:16:14 +01:00
Amish Shah
04618f554f voice: fix _writeCallback being called multiple times (#2567) 2018-06-13 21:06:50 +01:00
Amish Shah
3bfc1ff61c voice: fix write after end (#2567) 2018-06-13 21:02:19 +01:00