Commit graph

1606 commits

Author SHA1 Message Date
Kyra
89986ae293 backport: UNKNOWN_WEBHOOK (#2777) 2018-08-28 10:35:34 -05:00
Kyra
091b4fc214 backport: Guild#{fetchEmbed,setEmbed} (#2778)
*  backport: Guild Embeds

* fix: Added missing return

* docs: Updated typings
2018-08-28 10:33:51 -05:00
Kyra
3345c77ce2 backport: GUILD_INTEGRATIONS_UPDATE event (#2794)
* backport: Client#on{guildIntegrationsUpdate,webhookUpdate}

misc: Update Constants.WSEvents and WSEventType

backport: Add guildIntegrationsUpdate event handler

* docs: Updated typings
2018-08-28 10:25:44 -05:00
Ash
1fc84a95d0 fix(GuildChannel#lockPermissions): Properties allow and deny always returning undefined (#2800)
* fix undefined properties

* requested changes
2018-08-26 13:11:00 -05:00
Kyra
58ba2c7b14 backport: Deprecate allowed/denied as #2765 (#2792) 2018-08-26 13:03:02 -05:00
Kyra
453098117f backport: WEBHOOKS_UPDATE event (#2779) 2018-08-26 11:59:15 -05:00
Lewdcario
93bf430fc7
fix: Guild#addMember incorrectly resolving userID 2018-08-26 09:46:55 -06:00
Kyra
469fbe2889 docs(Emoji): fix typo of the word "emoji" (#2791) 2018-08-24 18:31:43 +02:00
Kyra
911e289b55 backport: User#dmChannel perf enhancement (#2780) 2018-08-22 11:52:21 +02:00
Isabella
4ee3cf0b55
fix: WebhookClient should handle ratelimits properly 2018-08-21 11:12:02 -05:00
Kyra
dc8cf08de9 backport: handle async stacktraces correctly (#2768) 2018-08-21 10:31:32 +02:00
SpaceEEC
5d889be6db
fix(Permissions): Permissions itself is a valid PermissionResolvable
fixes #2753
2018-08-15 13:55:04 +02:00
SpaceEEC
616e0dd398
fix(Message): properly check for an edited_timestamp in patch
Fixes #2750
2018-08-15 09:18:17 +02:00
Souji
3021e5ce7f Docs: document ChannelData.parent and .permissionOverwrites, fix typedefs to not include Collection of ChannelCreationOverwrite (#2734)
* document ChannelData.parent

* document ChannelData.permissionOverwrites

* Overwrites also take other things, account for it

* note to self: stop copy-pasting

* remove eslint madness, fix param defs

* fix property slip
2018-08-13 15:17:09 +01:00
Lewdcario
d772bff632
fix(ClientDataManager): replacing channels unecessarily 2018-08-12 11:50:01 -05:00
SpaceEEC
8adfc97409
docs(Client): actually fix rateLimit's event params 2018-08-11 09:38:58 +02:00
Lewdcario
0e370d7a4c
docs: fix client#rateLimit parameters 2018-08-09 14:58:17 -05:00
Lewdcario
7126cade45
fix: richEmbed#_apiTransform fields 2018-08-09 13:52:50 -05:00
Souji
bafbee9677 docs: small changes regarding permissions/overwrites (#2718)
* Add Collection as param to GuildChannel#replacePermissionOverwrites

* Add example for null to PermissionOverwriteOptions

* eslint-disable max-len

* PermissionOverwriteOptions desc. change default to unset

* deprecated allow/deny in favor of allowed/denied
2018-08-09 10:52:59 -05:00
Lewdcario
6da423fc07
backport: Permissions#toArray 2018-08-08 22:17:08 -05:00
Lewdcario
1e5b5b83c8
backport: GuildChannel#permissionsFor(role) 2018-08-08 22:16:46 -05:00
Lewdcario
c76f3048af
backport: TextChannel#bulkDelete accepts Snowflake[] 2018-08-08 17:14:52 -05:00
Souji
af6d649510 docs: change for GuildChannel#replacePermissionOverwrites (#2714) 2018-08-08 16:09:39 -05:00
SpaceEEC
c7f379f51d
docs(RichEmbed): timestamp is actually a Date 2018-08-07 21:46:54 +02:00
SpaceEEC
4a48a7d621
docs(ShardingManager): respawnAll actually resolves with a collection of shards keyed by numbers 2018-08-07 21:36:03 +02:00
Lewdcario
c33ab1ea61
backport: add PRIORITY_SPEAKER permission 2018-08-03 19:09:09 -06:00
Lewdcario
87b4b23596
backport: fix circular conversion when editing RichEmbed 2018-08-03 15:33:51 -06:00
Lewdcario
b63948e14e
backport: RichEmbed#attachFiles 2018-08-02 15:06:27 -06:00
Lewdcario
4a9c2f8884
fix(Emoji#fetchAuthor): reject with Error rather than TypeError 2018-07-26 14:35:26 -06:00
Lewdcario
41f6eaa635
backport: Message#url getter 2018-07-26 11:22:29 -06:00
Lewdcario
95a2d25b7d
chore: deprecate userbot methods 2018-07-26 11:18:41 -06:00
Lewdcario
d685e39af4
backport: add rejection for Emoji#fetchAuthor if managed
Signed-off-by: Lewdcario <isabellafj97@gmail.com>
2018-07-26 10:24:26 -06:00
Lewdcario
96011cf68f
backport: make Webhook token not enumerable 2018-07-26 09:51:47 -06:00
Isabella
488b1eb4ee
backport: Sharding utility methods (#2672) 2018-07-25 12:08:08 -04:00
Lewdcario
6d70da5b1e
backport: fix circular conversion in RichEmbed 2018-07-23 22:41:07 -06:00
Lewdcario
e4da97e058
eslint: re-enable eslint after disabling max-len 2018-07-23 14:34:38 -06:00
SpaceEEC
886c21223e
fix(GuildAuditLogs): default to PartialGuildChannel if channel deleted (#2605) 2018-07-18 11:38:59 +02:00
Gymnophoria
a97b5040e6 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:37:36 +02:00
Lewdcario
524a15df0b
backport: Permissions improvements 2018-07-17 21:49:21 -05:00
Lewdcario
0702a0fcda
backport: DefaultMessageNotifications 2018-07-17 21:32:24 -05:00
SpaceEEC
1d9edec567
fix(Message): keep reply option when replying with an embed or attachment
Fixes #2651
2018-07-08 21:40:12 +02:00
Amish Shah
d81441f627
voice: null-check UDP socket 2018-07-03 14:15:27 +01:00
Amish Shah
695ff1e70f
voice: fix #2635 (channel bitrate not being set) 2018-07-02 19:45:35 +01:00
Lewdcario
a667e44c4d
fix(Client): login catch 2018-07-01 10:05:56 -05:00
Lewdcario
3d82ca901b
docs: improvements in various places
* Client#login example consistency

* add warning to Client#fetchApplication

* incorrect WEBHOOK_DELETE value
2018-06-29 19:38:20 -05:00
Lewdcario
448f38429d
fix(Client): login not properly rejecting on invalid token 2018-06-29 19:38:06 -05:00
Lewdcario
3fa9ed1f42
backport: deleted property 2018-06-29 19:11:50 -05:00
Lewdcario
72346fb47e
fix(TextBasedChannel): bulkDelete should not return non-Promise 2018-06-29 17:32:56 -05:00
Camzure
7ce1d1642c docs: only cached messages emit reaction events (#2607)
* wording improvement

* wording improvement for docs

* docs: wording

* wording

* user account only: docs

* Edited

* Edited

Signed-off-by: SpaceEEC <spaceeec@yahoo.com>
2018-06-21 21:40:52 +02:00
SpaceEEC
8a3ae875bb
fix: do not cache webhook users (#2611)
Goal in mind is to not save the name and avatar used by webhooks because
those can change between messages without any other update.
2018-06-21 21:34:30 +02:00
SpaceEEC
bd3d8d48c0
docs(GuildMember): joinedAt is nullable
See: ecf6e2b62d
2018-06-21 21:24:53 +02:00
RumbleFrog
493ba73037 fix(ShardClientUtil): send method's promise erroneously rejecting (#2604)
Patches the remaining ones that were missed in eef4a4ad17
2018-06-17 08:21:51 +02:00
reeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
507cce3ff4 docs: document lastMessageID for TextChannel and (Group)DMChannel (#2602)
* Adds JSDocs for TextChannel.lastMessageID

* oops

* docs: document lastMessageID in (Group)DMChannel as well
2018-06-16 22:10:24 +02:00
Lewdcario
6de5acbac3
backport: RichPresence 2018-06-09 15:37:01 -05:00
Lewdcario
ecf6e2b62d
fix(GuildMember): mark joined as nullable 2018-06-09 15:15:08 -05:00
Lewdcario
caa4104b95
docs: GuildMember#speaking
closes #2540
also improves consistency
2018-06-05 00:31:06 -05:00
Lewdcario
f238883046
fix(MessageReaction): fetchUsers inconsistency
Unlike TextChannel#fetchMessages, this method returned the cache rather than the fetched items, so in interests of consistency, this does as well now
closes #2574
2018-06-05 00:31:03 -05:00
Lewdcario
eef4a4ad17
fix(Shard): erroneously returning false
The node documentation fails to correctly document when the backlog of unsent messages exceeds a certain threshhold the function will return false. This does not mean it will refuse to send- simply that it will take time. Issue in point: https://github.com/nodejs/node/issues/7657#issuecomment-240581726
2018-06-05 00:31:00 -05:00
Lewdcario
c699888780
docs: add examples & improve notices 2018-06-05 00:30:50 -05:00
Lewdcario
0387d34ab4
fix(VoiceChannel): deletable erroneously returning true 2018-06-04 17:18:27 -05:00
Adrien Brignon
13880fe7de docs(Guild): handle error in example of fetchInvites correctly (#2568) 2018-05-27 20:59:12 +02:00
SpaceEEC
f23b61794c
fix(ClientUser): correctly resolve nicks to an object in createGroupDM 2018-05-25 17:23:09 +02:00
SpaceEEC
f456f4c3c0
feat(Collection): backport partition method
Commit: a732402c95
PR: #2511
2018-05-25 16:49:10 +02:00
SpaceEEC
f921261f3f
fix(docs): remove duplicated Collection#findAll docstring
Also added intended @ deprecated decorators
2018-05-25 16:44:49 +02:00
Lewdcario
b2d1cb6a3d
docs: permissions 2018-05-12 00:51:08 -05:00
Lewdcario
09ddbcb88a
chore: deprecations 2018-05-12 00:40:12 -05:00
Lewdcario
6f02be2b2e
docs: rateLimit event 2018-05-11 23:21:39 -05:00
Lewdcario
0d90798c6c
backport: rateLimit event 2018-05-11 20:55:31 -05:00
Lewdcario
379061987c
fix: burst request mode hanging permanently 2018-05-11 19:27:34 -05:00
1Computer1
de7d90ada3
feat(Collection): add tap method (#2507)
* Add Collection#inspect

* No u

* Rename to tap

* Rename variable

* Do it here too
2018-05-09 16:46:54 +02:00
bdistin
2b6592ed54
feat(Collection): add sweep method (#2528) 2018-05-09 16:42:28 +02:00
SpaceEEC
9bb8831619
feat(GuildMember): add manageable getter 2018-05-09 16:38:28 +02:00
SpaceEEC
99041671f0
feat(GuildChannel): add fetchInvites method
Backported from commit: 47bc0fc51e
PR: #2339
2018-05-09 16:28:40 +02:00
SpaceEEC
dd7eedbd48
feat(Emoji): add fetchAuthor method
Backported from commit: e0cbf0bb60
PR: #2315
2018-05-09 16:20:41 +02:00
SpaceEEC
c0ca73a40c
feat(Game): add toString method
Backported from commit: 016526486c
PR: #2313
2018-05-09 16:08:59 +02:00
SpaceEEC
15a8e17710
fix(Guild): memberCount not decrementing when an uncached member leaves
Backported from commit: 93e083da4f
2018-05-09 16:07:20 +02:00
SpaceEEC
54913d9edb
feat(GuildChannel): add setNSFW method
Backported from commit: 0fc9459450
PR: #2050
2018-05-09 16:04:49 +02:00
Gus Caplan
9169958264
feat(Guild): add verified getter (#2027) 2018-05-09 15:52:00 +02:00
SpaceEEC
96b115ef7b
feat(ClientDataResolver): add 2 basic role colors
Commit: 3a3ca96b0d
PR: #2303
2018-05-08 22:35:35 +02:00
Will Nelson
2d831269ab
feat(Permissions): add valueOf method (#2363) 2018-05-08 22:30:27 +02:00
Jonah Snider
e5e59cce32
docs(Role): Change 'the this' to this (typo) (#2377)
Commit: 8b679913a4
2018-05-08 22:27:58 +02:00
Pascal
ae28f52e0d
fix(ClientDataResolver): always resolve with a buffer when fetching a file
Commit: 85413481ed
2018-05-08 22:25:49 +02:00
SpaceEEC
9264511092
docs(ClientUser): correct warning for createGuild method
Backported from: 2bf68dcdfb
PR: #2453
2018-05-08 22:06:07 +02:00
SpaceEEC
2f2e28183b
fix(Role): allow role color to be removed
Backported from: f985b6bef3
PR: #2447
2018-05-08 22:05:56 +02:00
SpaceEEC
54fa5f644f
docs(GroupDMChannel): fix top 'an user' -> 'a user' 2018-05-08 20:14:23 +02:00
bdistin
b757f9ef2d
docs(Collection): fix spelling of 'behavior' (#2529) 2018-05-08 19:07:49 +02:00
Kyra
bd9c9ce4e0
refactor(VolumeInterface): remove usage of deprecated new Buffer (#2531) 2018-05-08 18:55:52 +02:00
SpaceEEC
60288d0704
fix(Collector): increase and decrease max listeners dynamically 2018-05-08 11:57:12 +02:00
SpaceEEC
ed8ab91782
feat(Emoji): add deletable getter
Backport for commit: fca6d3be56
From PR: #2535
2018-05-08 11:35:14 +02:00
SpaceEEC
21326f67a0
feat(ClientDataResolver): account for discord.gg/invite/<code> invites 2018-05-04 18:49:53 +02:00
Kyra
8700e965c5 feat(DiscordAPIError): backport method property (#2536) 2018-05-03 22:47:50 +02:00
Kyra
a89de09855 fix(RESTMethods): remove listener from correct event (#2534) 2018-05-03 17:56:10 +02:00
SpaceEEC
a85d801a12
fix(ClientUser): setActivity should resolve with a Presence 2018-05-01 20:27:05 +02:00
Amish Shah
5f50d9e627
voice: backport null key fix 2018-04-29 18:53:50 +01:00
SpaceEEC
33a4232652
fix(OpusEngineLinst): throw a descriptive error when not funding an opus engine 2018-04-28 14:30:14 +02:00
SpaceEEC
d9a091f674
feat(SnowflakeUtil): allow snowflakes to be generated dynamically 2018-04-27 20:34:48 +02:00
SpaceEEC
44fefdfa49
fix(Util): reject with a meaningful error instead of throwing one 2018-04-27 20:16:46 +02:00
Amish Shah
b05622766b
voice: start using provided IP rather than manually resolving 2018-04-27 15:25:05 +01:00
Isabella
49ad8cc2cc feat(GuildChannel): add manageable getter (#2439)
* Adds GuildChannel.manageable

* Resolve requested changes

* fix eslint max-len error

* Fix for nullable permissionsFor()

* Indent fixes
2018-04-26 01:31:52 -05:00
bdistin
7b9e84dff5 feat(Guild): add mfaLevel property (#2451) 2018-04-26 01:28:59 -05:00
Lewdcario
384e96d51e
backport: docs improvements 2018-04-26 01:25:44 -05:00
bdistin
feb0991c46 fix: use Object.keys instead of Object.values for node 6 (#2487) 2018-04-20 21:11:27 +02:00
SpaceEEC
ff671b2f3c
fix(RestMethods): typo timeout -> timed 2018-04-19 13:53:44 +02:00
SpaceEEC
b60ee25038
fix(MessageEmbed): avoid throwing error when accessing colorless hexColor 2018-04-19 13:14:20 +02:00
SpaceEEC
3ba26ad972
fix(Message): do not update editedTimestamp when there is none in the payload
Fixes #2307
2018-04-19 13:13:50 +02:00
SpaceEEC
de78a8d0b4
fix(RESTMethods): verify correct member in add and remove role listeners
Fixes #2480
2018-04-19 13:13:28 +02:00
SpaceEEC
7c37a0d386
fix(MessageDeleteBulkAction): remove bulkDeleted messages from cache
Fixes #2382
2018-04-19 11:50:30 +02:00
Lewdcario
c387e96078
fix: Client#generateInvite resolving permissions incorrectly 2018-04-18 20:30:24 -05:00
Lewdcario
7c0b6173dd
fix: Role#setPermissions resolving & docs 2018-04-18 19:57:16 -05:00
Lewdcario
92b421607e
fix: GuildChannel#setTopic not nullable 2018-04-18 19:35:28 -05:00
iDroid
f3ae7fd638 Fixed JSDoc owner thing (#2473)
Added a `?` before `GuildMember`, the `owner` property may be undefined in some cases.
2018-04-18 19:25:28 -05:00
sekwah41
6e5b674338 Fixed updateChannel being too protective (#2460)
If I am not mistaken the only way atm to remove a channels parent atm is to do this to get the null value through the code.

channel.client.rest.methods.updateChannel({id:channel.id, name:channel.name,
            topic:channel.topic,position:channel.position,
            bitrate:channel.bitrate,userLimit:channel.userLimit,parent:{id:null}}, {});

This fixes the method allowing channel.setParent(null); to work
2018-04-13 14:03:18 +02:00
Gus Caplan
c8f78b2bf0
fix(ws): set correct ratelimit remaining after reset or destroy (#1806) 2018-03-04 12:44:31 +01:00
Lewdcario
8f9e911b5f
fix: RichEmbed timestamp cloning 2018-03-02 18:52:43 -06:00
Lewdcario
363ead922a
fix: bulkDelete discarding non-cached messages 2018-03-02 12:17:10 -06:00
Lewdcario
96e88f3cef
docs: incorrect returns 2018-03-01 22:38:55 -06:00
Lewdcario
fcdffcf623
docs: improvements & examples 2018-03-01 20:47:18 -06:00
Lewdcario
acdf43a872
fix: GuildAuditLogs using Guild#fetchInvites 2018-03-01 20:37:19 -06:00
Lewdcario
38f5288be8
docs: Message#type 2018-03-01 20:12:14 -06:00
Lewdcario
f64e924f0d
fix: export CategoryChannel 2018-03-01 20:09:05 -06:00
Pascal
f2c5714751
fix(StreamDispatcher): remove gratuitous parentheses 2018-03-01 19:12:15 +01:00
FireController1847
ced93fe826
Specify that Client#uptime is "in milliseconds" (#2288) 2018-03-01 18:25:17 +01:00
Gus Caplan
7f5c1038db
fix websocket ratelimits (#2014) 2018-03-01 18:25:00 +01:00
Gus Caplan
af75e43900
proper fix for #1685 (#1805)
* Update WebSocketConnection.js

* Update WebSocketConnection.js

* Update WebSocketConnection.js

* Update RESTManager.js
2018-03-01 17:50:07 +01:00
Lewdcario
b79722a77b
docs: remove trailing commas 2018-02-27 17:43:51 -06:00
Lewdcario
2b24b10246 docs: trailing commas 2018-02-27 11:13:56 -06:00
Isabella
af3517594f docs: improvements 2018-02-27 10:43:31 -06:00
Pascal
c6f92c1bc5
fix: if present, wait for libsodium-wrappers' ready to support v0.7.3 2018-02-26 11:35:51 +01:00
Kyra
b7851bad37 perf(Collection): Performance improvements (#2342)
* Update Collection.js

* ESLint
2018-02-21 22:03:40 +01:00
Pascal
dc92582eb4
fix(ReadyHandler): don't create new guild instances for already existing guilds
See: #2319, #2332
2018-02-21 21:41:02 +01:00
Lewdcario
40a2f093aa
fix(VoiceChannel): setUserLimit defaulting to wrong value 2018-02-13 10:43:38 -06:00
David Siaw
8ee2788baf fix(StreamDispatcher): properly check that timestamp fits in 2^32-1 (#2325)
* fix a very strange bug caused by massive timestamps sent to discord

* remove 'gratituous' spaces
2018-02-11 08:35:46 +01:00
Pascal
3df3741922
backport/fix(GuildDelete): disconnect voice and cleanup GuildChannels 2018-02-05 13:03:43 +01:00
Pascal
96904b1826
fix(AudioPlayer): add opus to destructured key of stream options
This fixes #2079 (VoiceConnection#playOpusStream being broken)
2018-02-05 10:42:47 +01:00
Lasse Niermann
1f14758e0c docs(ClientUser): mark email field as user account only property (#2306)
* Store Mail - User Account Only

Added that info

* docs(ClientUser): mark email field as nullable
2018-02-01 20:06:59 +01:00
Lewdcario
52c402faea
fix(resolveColor): not interpreting DEFAULT correctly 2018-01-28 19:04:55 -06:00
Lewdcario
e978253896
fix(Webhook#send): incorrect docs + return
Two things:
* Documentation doesn't account for possible raw object return
* Allows the return to be a Message object as well, like the docs originally intended
2018-01-24 13:06:05 -06:00
Pascal
8df1ac9920
fix(startTyping): return, to not overwrite already existing entries 2018-01-22 14:09:27 +01:00
Cynthia Lin
00e2f39ea1 fix(client#voiceConnections): Incorrect docs description (#2280) 2018-01-20 22:09:39 -06:00
Pascal
b5ff309bf9
fix(CategoryChannel): set the type to 'category' and document its type 2018-01-20 23:27:18 +01:00
MaySoMusician
8cbefcc081 [v11.3.x] Fix param to setPresence in setActivity (#2270)
ClientUser#setPresence in master branch (latest) calls client.presences.setClientPresence, but that in v11.3 does not
so i change parameter sent to setPresence for clearing the game activity, from activity:null to game:null,
for now until setPresence gets updated
2018-01-18 02:39:54 -06:00
Isabella
932980e91f fix(guild#createRole): incorrect guild reference 2018-01-16 08:28:08 -06:00
Isabella
f62fa05389 fix(Message#addReaction): incorrect regex (#2247) 2018-01-13 17:22:23 +00:00
Isabella
2efe2d28f2 fix(Channel#startTyping): less breaking (#2232)
* fix(Channel#startTyping): less breaking

* silent

* appelation suggestion

* space suggestion
2018-01-11 16:18:40 +00:00
Frangu Vlad
0821acfa99 Fix iter issues (#2237) 2018-01-09 21:17:46 +01:00
Isabella
d94ead70f8 fix(avatarURL): gifs not being animated (#2195) 2018-01-05 21:33:50 +00:00
Isabella
8226752098 fix(voiceStateUpdate): incorrect members.size (#2231) 2018-01-05 21:28:57 +00:00
Michel Nguyen
e883afa0ee docs: fix guildChannel#toString() example (#2203)
* fix the docs

* don't log something what you don't log
2018-01-04 01:17:40 +01:00
SpaceEEC
659e89e8cd feat: backport animated emojis support (#2217)
Commit: 84e4dd6a99
2018-01-04 01:16:50 +01:00
Isabella
c79823002b docs: improve examples (#2200)
* docs: improve examples


another

* remove conflict

* some nuances

* backport
2018-01-04 01:14:36 +01:00