Commit Graph

871 Commits

Author SHA1 Message Date
bdistin
4fb7e64a39 Add parent, nsfw, bitrate, and userLimit options to GuildChannel.clone() (#2259)
* Add parent, nsfw, bitrate, and userLimit options to GuildChannel.clone()

* fix lint
2018-01-16 01:20:09 +01:00
Dim
351f5f7209 fix: missing height & width in embeds (#2249) 2018-01-14 13:28:46 +00:00
Dim
a3be0f3726 docs: Collection > RoleStore (#2251) 2018-01-14 13:28:00 +00:00
bdistin
2249da464f Fix member.ban() and channel.clone() (#2241)
* Fix member.ban()

* also fix channel.clone()

* type is an option parameter in the new create

* lint

* better fix for clone
2018-01-11 18:44:35 +00:00
Isabella
9eac19d9d8 refactor: more oop with stores (#2216)
* refactor: more oop with stores

* forgot bulk delete

* Revert "forgot bulk delete"

This reverts commit 1b4fb999ee07b358ee6e1af9efb8981b84f83af1.

* appease linter

* missed some


shh

* fail
2018-01-11 16:33:30 +00:00
bdistin
5efddac025 Fix Channel.delete() example (#2238) 2018-01-09 21:17:08 +01:00
Isabella
45127bb408 docs: improve examples (master branch) (#2209)
* docs: improve examples

* more improvements


fix


maybe this


another example


collectors

* stuff
2018-01-04 01:12:05 +01:00
Isabella
61da73fee0 GuildMember#permissionsFor takes object (#2210) 2018-01-04 01:04:19 +01:00
Gus Caplan
abb93c9eb9 fix location of toString for channels (#2202) 2018-01-04 01:01:39 +01:00
Darqam
954a1c8d1a updating channelCreate example to reflect recent changes (#2194)
* updating channelCreate example to reflect recent changes

Type is now part of the options object, so the example should reflect that.

* changing type to reason per comment
2018-01-04 01:00:39 +01:00
Steven
229eb2be2d Fix Collector bug where checkEnd is only called on a valid message (#2186) 2017-12-31 20:21:29 +01:00
Gus Caplan
84e4dd6a99 animated emojis (#2182) 2017-12-31 20:20:52 +01:00
Alex
59d5c5a947 Don't send files in edit request (#2199) 2017-12-31 20:19:05 +01:00
Isabella
4063a3a16b fix(Guild#createChannel): default type to 'text' (#2184)
* fix(Guild#createChannel): default type to 'text'

* gus suggestion
2017-12-23 12:29:42 +01:00
Isabella
4f8f2087c1 docs/fix(setParent): docs update and nullable channel param (#2160)
* fix(setParent): no longer in GuildChannel

* refactored

* little bit less ugly

* space/appel suggestion

* docs fix

* shhhhhhhh

* fun docs trip

* prototype thing

* mark nullable
2017-12-21 09:31:17 +01:00
Yukine
0c16859746 enchanced docs for GuildChannel (#2155)
* enchanced docs for GuildChannel

* changes due request
2017-12-21 09:30:32 +01:00
Isabella
1598efa0b8 fix(CreateMessage): reassigning wrong content (#2169) 2017-12-12 06:33:10 +01:00
Isabella
443961ce43 fix(CreateMessage): fix attachment and array sending (#2158) 2017-12-10 21:22:59 +01:00
Yukine
134ef7a61b added a new Typedef for Bans you can get from <Guild>.fetchBans() and fixed a little typo in the fetchAuditLogs() method (#2108)
* added a new Typedef for Bans you can get from <Guild>.fetchBans() due recent change aswell as fixed a little typo in the fetchAuditLogs() mehtod so .type has no the correct type defined

* little change due request

* fixed indentation

* Update Guild.js

* Update Guild.js
2017-11-29 23:36:03 -05:00
Schuyler Cebulskie
77fc046550 Merge branch 'custom-structures' 2017-11-29 23:27:43 -05:00
Frangu Vlad
efd1c4c516 docs: Remove leftover docstring from 11.2 (#2115)
* Fix leftover docstring from 11.2

* Here too

* Update Guild.js

* Update GuildMember.js
2017-11-26 10:59:21 +01:00
1Computer1
2f84d95077 Add more options to MessageMentions#has (#2131)
* Add more options to MessageMentions#has

* Rename ignoreSelf to ignoreDirect
2017-11-26 10:58:17 +01:00
Schuyler Cebulskie
7cd0a9525d Fix ClientUser not extending custom User 2017-11-24 23:05:00 -05:00
bdistin
dcf48e2225 Fix inconsistency with Channel Creation: CustomStructures (#2121)
* Fix inconsistancy with Channel Creation

* Because static get is a function, it thinks we are create a new instance based on that function, rather than the returned class...
2017-11-24 22:42:02 -05:00
Gus Caplan
aaa92c0b05 fix things (#2116) 2017-11-20 12:57:45 +01:00
Schuyler Cebulskie
b859501b6f Document and clean up some garbage 2017-11-18 20:30:13 -05:00
Schuyler Cebulskie
b7c4df5dc1 Fix trailing space 2017-11-18 17:19:34 -05:00
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
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
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
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
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
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
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
Gus Caplan
69d84081d3 Update Guild.js (#2027) 2017-10-19 07:02:32 +02:00