Commit Graph

1120 Commits

Author SHA1 Message Date
Gryffon Bellish
d280d1b03f style: change let to const in MessageMentions (#3483) 2019-09-24 17:36:19 +02:00
Crawl
321beb73bd revert: "feat(Partials): add DMChannel/MessageReaction#fetch()… (#3468)
This reverts commit b0047c424b.
2019-09-10 19:49:56 +02:00
izexi
b0047c424b feat(Partials): add DMChannel/MessageReaction#fetch() and Parti… (#3261)
* add DMChannel#fetch() & Action#getChannel({recipients})

* ref for MessageReaction partial

* typings

* add PartialTypes.REACTION

* accommodate for fully removed reactions

* fix incorrect wording and typo

* typings: MessageReaction#count is nullable

* typings: mark MessageReaction#partial as readonly

Co-Authored-By: Vlad Frangu <kingdgrizzle@gmail.com>

* fix(User): fetch dm channel if cached one is partial

* docs: add missing comma

Co-Authored-By: Antonio Román <kyradiscord@gmail.com>
2019-09-10 16:09:06 +02:00
Carter
6f83e71555 feat: Guild#partnered (#3444)
* feat: Guild#partnered

* typings: added Guild#features

* fix: removed trailing space

* typings: made Guild#partnered readonly
2019-09-10 15:47:13 +02:00
SpaceEEC
8e0f525d91 fix(Role): throw TypeError in comparePositionTo (#3466) 2019-09-10 15:44:49 +02:00
Will Nelson
c86a6154aa feat(VoiceState): add kick method (#3462)
* feat(VoiceState): add kick method

* feat(typings): add types for VoiceState#kick method
2019-09-10 10:00:04 +01:00
Antonio Román
d252ddf9da docs: Document Message#author as nullable (#3464)
Fixes #3463
2019-09-08 09:49:10 +02:00
Vlad Frangu
5e4f9d436d src: alphabetize guild features and make sure they're up to date (#3441) 2019-08-21 12:52:35 +01:00
Vlad Frangu
fbd811517a src: Update Webhook#sendSlackMessage to be accurate with what the API returns (#3429)
* src: Update sendSlackMessage

* typings
2019-08-19 21:02:33 +01:00
SpaceEEC
c786867bd6 fix(Webhook): return raw data if the channel is unavailable
Fixes #3424
2019-08-18 11:45:28 +02:00
izexi
d62db232e7 feat(Invite): add targetUser(Type) (#3262)
* add Invite#targetUser(Type)

* incase discord decides to add 0
2019-08-17 20:31:04 +02:00
Khoo Hao Yit
8ae7a30d0b fix(Message): delete method caused messageDelete event to fire twice (#3252)
* ref: add getPayload and use for other get* methods

* return existing data.*

* use Action.getUser()

* Fix messageDelete double emission
2019-08-17 19:33:03 +02:00
Gryffon Bellish
ab27dd0218 refactor(TeamMember): remove client from constructor (#3409)
* Remove client from TeamMember constructor part 1

* Remove client from TeamMember constructor part 2

* update typings
2019-08-17 18:24:16 +02:00
didinele
2df4f227a4 refactor: move Guild#defaultRole to RoleStore#everyone (#3347)
* remove guild#defaultRole

* add RoleStore#defaultRole

* typings

* fix trailing space

* another one

* Rename it to everyone
2019-08-17 18:02:17 +02:00
bdistin
6d3c55b68c feat(Collector): allow collectors to be consumed by for-await-of loops (#3269) 2019-08-17 17:57:45 +02:00
Alex
e562564123 docs(Guild): add missing features (#3406)
* Update Guild.js

* Update Guild.js

* style(Guild): remove trailing space

* typings(Guild): add new features
2019-07-28 15:24:27 +02:00
bdistin
00c4098bb3 refactor(Util.escapeMarkdown): allow separate escaping and add tests (#3241)
* wip refactor

* add escapeMarkdown tests

* italics can be done with a single underscore too

* more refined

* fix test name

* unnecessary eslint ignores

* use jest

* make eslint less annoying in this test file

* more testing

* fix lib usage

* more tests and a small fix
2019-07-11 22:08:40 +02:00
Eduardo Londero
f1433a2d97 feat(Collector): add idle time for a Collector to stop itself (#2942)
* Implement idle feature

* Add typings

* Minimal fixes

* Make everything in Collector and not attached to ReactionCollector

* set this._idletimeout to null when collector ends

* also set this._timeout to null when collector ends
2019-07-11 21:40:12 +02:00
Jisagi
adb082305d feat(Guild): add banner to edit method and add setBanner method (#3364)
* add setBanner method to Guild

* typos fixed & typings added

* more typings

* docs(Guild): add banner to GuildEditData
2019-07-11 13:09:43 +02:00
Skillz4Killz
20d7b3de59 docs/typings(VoiceStateStore): document and type the class (#3294)
* Update index.d.ts

* Update Guild.js

* Update Guild.js

* docs/typings(VoiceStateStore): document and add typings
2019-07-04 16:20:28 +02:00
SpaceEEC
b65a4f05da fix(ClientApplication): fix ternaries 2019-06-26 20:19:05 +02:00
SpaceEEC
1dd4c041e0 fix(ClientApplication): owner is still nullable
Fixes #3358
2019-06-26 20:12:05 +02:00
SpaceEEC
4c11347511 docs(Team*): fix appliction -> team, tag -> mention 2019-06-26 11:42:03 +02:00
SpaceEEC
d7b2146c81 refactor(TeamMember): make id a getter 2019-06-25 20:40:15 +02:00
bdistin
a22aabf6a8 feature: teams support (#3350)
* basic teams support

* export Team & TeamMember

* use typedef

* typings and some fixes

* Update src/structures/TeamMember.js

Co-Authored-By: Vlad Frangu <kingdgrizzle@gmail.com>

* fix Team#iconURL()

* fix typings and a bug

* fix states start at 1

* team icon hash can be null

* fix owner typings
2019-06-25 20:31:48 +02:00
Ryan Munro
f82f0af928 docs(Presence): document client property (#3342) 2019-06-12 21:54:12 +02:00
Alex
19ef45130b docs(Guild): add missing features (#3336)
The addition of missing guild features that were added in the Nitro boost update, such as ANIMATED_ICON
2019-06-08 10:38:45 +02:00
SpaceEEC
8e1857286d typings(Guild): add typings for setRolePositions
See:
PR: #3317
Commit: 8bc8ffe168
2019-06-05 22:18:01 +02:00
brian
8bc8ffe168 feat(Guild): add setRolePositions method(#3317)
Allows for role positions to be batch-updated similar to how channel
positions are. It uses the Discord API endpoint PATCH /guild/:id/roles
2019-06-05 21:57:31 +02:00
izexi
c87758086b feat: add support for premium guilds (#3316)
* add premiumTier and premiumSubscriptionCount

* add premiumSinceTimestamp and premiumSince

* add premium message types

* typings

* add GuildEmoji#available

* fix doc description
2019-06-05 21:34:33 +02:00
izexi
3f1232ebf3 feat: throw custom error for uncached Guild#me (#3271)
* handle cases where Guild#me is uncached

* fix id prop

* remove unnecessary checks

* space's requested changes
2019-05-25 13:50:32 +02:00
bdistin
abebeac193 fix(Message#pinnable): you can't pin system messages (#3279) 2019-05-18 19:02:23 +02:00
SpaceEEC
3ad16fa351 fix(GuildMember): do not create a channel key when editing
This is to not break GuildMember#setNickname for the current user
2019-05-18 14:08:12 +02:00
anandre
55447fd4da docs(TextChanne): specify unit of rateLimitPerUser (#3272)
* Update TextChannel.js

Update `setRateLimitPerUser` description to specify the `number` is in seconds, per the Discord docs

* Update TextChannel.js

Add unit to the rateLimitPerUser property

* Update GuildChannel.js
2019-05-15 22:33:27 +02:00
SpaceEEC
8b83e2fdcb typings(Presence): add missing guild property 2019-05-04 19:05:04 +02:00
Amish Shah
e64773e21b Add ability to kick members from VoiceChannels and remove duplicated methods (#3242)
* feat(voice): kick members from voice channels

* fix(VoiceState): improve stability in checking for client user

* feat(VoiceState): add setChannel for moving/kicking members

* update typings

* remove duplicated methods across GuildMember and VoiceState

member.setDeaf => member.voice.setDeaf
member.setMute => member.voice.setMute
member.setVoiceChannel => member.voice.setChannel
2019-05-04 16:46:42 +01:00
Amish Shah
d7f8fd1ae0 fix #3244 2019-05-04 16:21:49 +01:00
Jacz
692494dc04 feat(VoiceState): self mute/deaf methods (#3243)
* Implemented setSelfMute/Deaf, done typings, fixed bug in VoiceState with errors.

* Completed requested changes

* return send in sendVoiceStateUpdate so its a promise, update typings

* Updated methods to return a boolean

* Requested changes

* Fix bug

* Update src/structures/VoiceState.js

Co-Authored-By: MrJacz <23615291+MrJacz@users.noreply.github.com>

* fix
2019-05-03 17:11:11 +02:00
Vlad Frangu
a59968f7de src: add news and store channels, and missing guild props (#3168)
* src: Implement store and news channels!

* src: Remove code dupe

* src: Add missing guild properties

* docs: Add a small notice that the channel type may also change

* src: Remove re-creation of the MessageStore

* lint: Unused Import

* src: Requested changes for StoreChannels

* typings: Fix typings

* src: Moar guild updates

* src: Set maximumPresence to the data prop, the already existent one, or default to 5000

* typings: afkChannel is a VC

I keep confusing them, ffs

Co-Authored-By: vladfrangu <kingdgrizzle@gmail.com>

* docs: Document that maximumMembers and maximumPresences may be inaccurate before fetching

* src Appels requested changes
2019-05-03 17:08:07 +02:00
Amish Shah
0d9bc8664d voice: make Guild.voice more robust 2019-04-29 19:31:31 +01:00
Amish Shah
bcb0cd838b voice: remove Guild.voiceConnection and VoiceChannel.connection 2019-04-29 19:29:16 +01:00
Amish Shah
dd44647537 voice: Guild.voiceConnection => Guild.voice.connection 2019-04-29 19:24:27 +01:00
bdistin
2666a9d6db feat(MessageStore): add remove() (#2468)
* MessageStore#remove()

* typings
2019-04-29 17:53:32 +01:00
Vlad Frangu
d7a9b74523 src: Replace instanceof Array checks with Array.isArray and instanceof Buffer with Buffer.isBuffer (#3227)
* src: Replace instanceof Array checks with Array.isArray

* src: Buffer.isBuffer instead of instanceof Buffer
2019-04-29 17:49:41 +01:00
izexi
870528ed33 feat(VoiceChannel): add editable (#3173)
* add VoiceChannel#editable

* replace unnecessary super with this

Co-Authored-By: izexi <43889168+izexi@users.noreply.github.com>
2019-04-29 17:35:48 +01:00
izexi
23191da13d feat(Partials.GuildMember): GuildMemberRemove & Guild#me (#3229)
* use partials for GuildMemberRemove & Guild#me

* oops

* guild.members instead of Action.members

Co-Authored-By: izexi <43889168+izexi@users.noreply.github.com>
2019-04-29 17:05:52 +01:00
Crawl
aa253d9551 fix(ClientUser): lint 2019-04-28 13:14:26 +02:00
Amish Shah
4e0cf87d0f fix: typing map being reset for ClientUser (#3216) 2019-04-27 18:52:26 +01:00
SpaceEEC
6a07715c1d fix(Guild): only update emojis when they are present in the payload 2019-04-23 21:02:16 +02:00
Vlad Frangu
75cd260808 src: Don't use the GuildMemberRoleStore to patch the GuildMember _roles (#3226)
* src: Don't use the GuildMemberRoleStore for patching GuildMember#_roles

* src: Remove usage of _patch from the store

* src: Finish up clone changes
2019-04-23 19:44:02 +01:00