Commit Graph

3151 Commits

Author SHA1 Message Date
Drahcirius
8237bc054c So long, long (#1994)
* refactor: remove long dep

* fix linter issue

* remove file extensions

* optimize methods
2017-11-17 14:37:07 +01:00
Frangu Vlad
0cd4a92fb8 docs: Fixed some missing docstrings or incorrect return types (#2093)
* Fix some missing doc strings
Mainly just readonly tags

* Return an error when guild#allowDMs is ran from a bot account, and fix some return types

* WebhookClient implements Webhook, doesn't extend it

* Fix Client#rateLimit docs not showing what it returns

Cause I wanted to handle this event only to see no return props 🤔

* Actually make Client#rateLimit show the right info

Its an object with all the info
2017-11-17 14:20:57 +01:00
SpaceEEC
6fa4fc532c fix(Shard): extend EventEmitter to be able to emit events (#2112) 2017-11-17 02:49:57 -05:00
Schuyler Cebulskie
196cf7652e Add Shard#ready property and related events 2017-11-16 22:49:38 -05:00
Will Nelson
09315ae9db emit ReactionCollector#remove on all unreactions (#2096)
* emit ReactionCollector#remove on all unreactions

this will emit an event when a user removes a collected reaction. this
is in addition to Collector#dispose, which will only fire when all users
have unreacted to the same emoji.

* emit only collected removals
2017-11-16 15:24:53 +01:00
Isabella
2d8e26c24c docs: add Guild#features type (#2105)
* docs: add Guild#features type

* fixed spacing

* make it a list, and add MORE_EMOJI
2017-11-16 15:24:27 +01:00
Isabella
5cd42695ae refactor(MessageReaction): ReactionUserStore (#2078)
* refactor(MessageReactions): fetchUsers() is now users.fetch()

made a lovely class for it and all
happify linter


stuff


i know how to code i swear


i lied

* bdistin suggestions

* space suggestions, rename store

* fix count

* documentation update
2017-11-14 08:11:44 +00:00
Yukine
62544905a0 enhanced setUserLimit to reset when passing null to stay consistent with other methods (#2083)
* added a new check to setUserLimit so it won't silently fail anymore if you put a wrong type in

* adapt spaces idea of converting null to 0

* this way it looks cleaner

* and i need to remove this

* need to do it that way because like Gus said null will not change anyhting

* space prooved me wrong and idk why ist working now
2017-11-10 01:30:13 +01:00
SpaceEEC
05a41b5ca4 fix(Split/Webhook): readd message chunk sending and fix webhook avatar/username (#2085) 2017-11-06 02:42:24 +01:00
SpaceEEC
21d09f338e fix(Guild): correctly resolve user in Guild#addMember (#2090) 2017-11-05 18:52:33 +01:00
Gus Caplan
29a81eab73 standardize message object creation (#1986)
* standardize message object creation so i don't flip out again

* fix stuff

* Update Message.js

* Update index.js

* Update SendMessage.js

* Update Message.js
2017-10-29 14:54:00 +01:00
SpaceEEC
94a4a068b9 fix(TextBasedChannel): return a promise in startTyping and clarify count parameter (#2047)
* fix(TextBasedChannel): return a promise in startTyping

This fixes #2040

Calling TextBasedChannel#startTyping now returns a promise.
This promise resolves when the bot stops typing (TextBasedChannel#stopTyping) or rejects when an error occurs.
Calling the method again returns the same promise as long the bot is still typing.

* move code into the promise' executor

* Clarify the purpose of the returned Promise

* inverse if and clarify count parameter
2017-10-29 14:53:34 +01:00
Sanctuary
1a8e8c7a67 docs: Add/normalize .toString() docs on all classes (#2042)
* docs: Add/normalize .toString() examples on all classes

* docs: Remove exclamation point on ClientApplication#toString example

* docs: Normalize .toString() descriptions on all classes

* Use "returns" instead of "concatenates"
2017-10-28 19:06:26 +02:00
SpaceEEC
0101392334 Documentation improvements (#2069)
* docs: fix documentation in various places

All stores: resolveID returns a nullable Snowflake
GuildAuditLogs: ActionType also can be ALL
MessageEmbed: make files property show up in the docs
ClientApplication: resetSecret and resetToken return a promise
ClientManager: status is readonly
Guild: features is an array of strings and ban no longer accepts a number or string
Guild: ban method no longer accepts a string or number
GuildMember: ^
RichPresenceAssets: small and large Image are Snowflakes, also fixed parameter documentation for small and large image url method
WebhookMessageOptions: file property is no longer a thing

* docs: improve GuildAuditLogs documentation

Prefix types with AuditLog to avoid confusion
Document GuildAuditLogs' static Targets and Actions properties and add necessary typedefs
Use typdefs over primitives where possible.

* fix documentation for Guild#defaultRole
2017-10-28 19:04:03 +02:00
SpaceEEC
a62d1e954d fix(Presence): pass client and default to offline (#2071) 2017-10-28 19:03:27 +02:00
Gus Caplan
50ad66f513 clean up readme a bit (#2054)
* clean up readme a bit

* Update README.md
2017-10-28 19:02:12 +02:00
William Tran
88719f0f42 Typos in docs (#2055)
* Typo in Guild.createRole docs

Added missing semicolon in example code.

* consistent periods in docs
2017-10-28 19:01:17 +02:00
Gus Caplan
c495ea025a fix raw event (#2074) 2017-10-28 18:58:46 +02:00
bdistin
b255af0825 Fix user.bot (#2073)
* fix user.bot

* user.avatar is nullable (docs)
2017-10-28 18:58:27 +02:00
bdistin
cda408534a user.patch shouldn't try to touch the token (#2072) 2017-10-28 18:57:50 +02:00
SpaceEEC
cd3d3344e8 fix(GuildMember#hasPermission): pass correct parameters to Permissions#has (#2070)
Also removed deprecated parameter of the method itself.
2017-10-28 18:57:16 +02:00
SpaceEEC
0a05761b49 Add new exports and remove a deprecated one (#2068)
* add new exports and remove a deprecated one

* fix incorrect require path
2017-10-28 18:55:59 +02:00
Johnson Chen
291af7e845 Change recent to timestamp because DiscordAPIError (#2065)
are lovely arn't they?
2017-10-28 11:35:38 +02:00
Schuyler Cebulskie
0fc9459450 Add TextChannel#setNSFW method (#2050)
* Add TextChannel#setNSFW method

* Doesn't look like anything to me

* butts
2017-10-27 10:34:18 -04:00
Gus Caplan
cd54e9317f Time Difference in REST (#2057) 2017-10-27 14:36:53 +01:00
Gus Caplan
bc30fdd867 Fix Avatar URL generation bug (#2063) 2017-10-26 20:07:27 +01:00
SpaceEEC
cd08a3b5a4 refactor(Actions): remove obsolete user and guild member get actions (#2061)
The UserGetAction was never used.
The GuildMemberGetAction was only once used.
Easily replaced with a shorter and more comprehensible line. (Also consistent with the rest of the library)
2017-10-26 08:52:03 +01:00
Gus Caplan
0589b7d7f1 zlib stream compression (#2028) 2017-10-25 17:30:03 +01:00
Isabella
0277d1de78 fix(Client): login wasnt using env.token (#2060) 2017-10-25 17:29:36 +01:00
Gus Caplan
ee1d4c53f2 Add rateLimit event (#2019)
* add ratelimited event

* add some useful props

* death

* more death

* Update tester1000.js

* Update RequestHandler.js
2017-10-24 21:07:21 +01:00
Amish Shah
80595d9bec Stop ESLint whining 2017-10-22 22:04:29 +01:00
Amish Shah
3e460162ca Update prism-media dependency to 0.0.2 2017-10-22 22:00:14 +01:00
Amish Shah
07bacf2a7d Update opusscript dependency to 0.0.4 2017-10-22 22:00:04 +01:00
Amish Shah
96ce1b0945 Update libsodium-wrappers peer dep and fix support for the newest version 2017-10-22 21:59:30 +01:00
Amish Shah
0004e19eca Fix ESLint issue 2017-10-22 16:03:35 +01:00
Amish Shah
29d743a521 Fix #2018 (rapid joining/leaving of voice channel causes a crash) 2017-10-22 14:29:49 +01:00
SpaceEEC
356778b9d5 fix(MessageBulkDeleteAction): remove deleted messages from cache (#2046)
Fixes #2036
2017-10-22 14:51:44 +02:00
Gus Caplan
339bcfd325 clean up webpack/deploy stuff (#2044)
* fix stuff i think

* Update deploy.sh

* Update deploy.sh
2017-10-22 14:45:32 +02:00
Gus Caplan
296046dbc6 remove ua manager (#2015) 2017-10-19 07:11:07 +02:00
Frangu Vlad
37f5256a04 fix(GuildChannel|Role.edit) Editing with a position not being right (#2010)
* Fix GuildChannel.edit and Role.edit for positions

* Re-use Util.setPosition
And also make it even more compact! And it works! \o/
2017-10-19 07:10:39 +02:00
Évelyne Lachance
8d7e745ee8 Patch timestamp of 0 on guild join date (#2041)
The Discord API seems to send a timestamp of 0 for the joined_at on presence updates. This patch resolves this by ignoring timestamps of 0.
2017-10-19 07:07:18 +02:00
kitsuyui
6b249ba454 Fixes #2034 (#2035)
Cancelling: https://github.com/hydrabolt/discord.js/pull/1745/files#diff-31d1bb7c08f2176ba026497c2e8d9b3fR81
2017-10-19 07:06:12 +02:00
SpaceEEC
fa3eee8fd9 fix(GuildDelete): disconnect voice and cleanup GuildChannels (#2026) 2017-10-19 07:03:02 +02:00
Gus Caplan
69d84081d3 Update Guild.js (#2027) 2017-10-19 07:02:32 +02:00
SpaceEEC
d8850dbdd8 feature(Webhook): allow to edit the channel of webhooks (#2039) 2017-10-19 07:01:20 +02:00
SpaceEEC
68a30584db refactor: remove redundant Client#rest and obsolete RESTManager#destroy (#2022) 2017-10-11 02:29:50 +02:00
Gus Caplan
d8f6198a12 fix websocket ratelimits (#2014) 2017-10-09 02:40:54 +02:00
Gus Caplan
69dcfa0708 fix Client#login from other invalid things (#2013) 2017-10-09 02:39:52 +02:00
Robin B
97823bc376 Various documentation adjustments (#2001)
* docs(various): Add "at" to createdAt description

* docs(Client): Adjust to fit with guilds property

* docs(various): Adjust phrasing & fix typos

* docs(various): Clarifications

* docs(Permissions): fix numerus

* docs(DataStore): capitalize DataStore

* docs(various): Formatting changes

* docs(Presence): Expand RichPresenceAssets docs

* Add space
2017-10-07 01:56:17 +02:00
Isabella
8fbae13040 fix(GuildAuditLogs): incorrect webhook reference (#2004)
* fix(GuildAuditLogs): incorrect webhook reference

* i cant trust my linter anymore

* use changes object
2017-10-07 01:55:53 +02:00