Commit Graph

2267 Commits

Author SHA1 Message Date
Antonio Román
a61cfc3004 docs: VoiceStateUpdate always sends an instance of VoiceState (#3537)
* docs: VoiceStateUpdate always sends the old

* typings: Update definition for voiceStateUpdate event
2019-10-18 11:32:19 +02:00
Antonio Román
a60f8b3d49 src(constants): add missing APIErrors (#3531)
* src: Updated APIErrors

* typings: Updated constants
2019-10-11 11:01:16 +02:00
izexi
a8f06f251f feat(VoiceState): add VoiceState#streaming (#3521)
* feat: add VoiceState#streaming

* typings: add VoiceState#streaming
2019-10-04 16:44:35 +02:00
Souji
48856c0815 fix: set messages deleted when their channel is deleted (#3519) 2019-10-04 16:44:04 +02:00
Vlad Frangu
a4f06bdffd src: support new message fields (#3388)
* src: Update channel pattern

* src: Remove useless non-capture group

* src: it's as though we're starting fresh

* src: Bring this up to date for reals now

* src: typings and a bug fix

* src: Add crossposted channels to message mentions

* src: Requested changes and add typings

* src: Move Object.keys outside loop

* typings: Fix enum being exported when it shouldn't

* src: Consistency with roles and users

* docs: Correct docstring for MessageFlags#flags

* docs: Correct docstring for MessageMentions#crosspostedChannels

* docs: Suggestions
Co-authored-by: SpaceEEC

* src: Reset flags to 0 if no flags are received on MESSAGE_UPDATE
2019-10-01 11:01:55 +02:00
Ryan Munro
a03e439d6b fix(GuildChannelStore): default channel type incorrectly set (#3496) 2019-10-01 10:56:14 +02:00
Jiralite
41c0dd44eb fix(BitField): throw when resolving invalid string constant
Checked to see if the permission actually exists.
2019-10-01 10:46:49 +02:00
Vlad Frangu
ea8b4e7355 docs/typings: Rename LURKABLE to PUBLIC and update GuildFeatures type (#3484)
* docs: Rename LURKABLE to PUBLIC

* typings: Update GuildFeatures type
2019-09-25 23:28:12 +02:00
Gryffon Bellish
d280d1b03f style: change let to const in MessageMentions (#3483) 2019-09-24 17:36:19 +02:00
Ryan Munro
60f89bd96f fix(stores): Add symbol.species for not-actual-stores (#3477)
* fix(stores): Add symbol.species for not-actual-stores

* Linting fixes
2019-09-22 23:50:41 +02:00
Crawl
321beb73bd revert: "feat(Partials): add DMChannel/MessageReaction#fetch()… (#3468)
This reverts commit b0047c424b.
2019-09-10 19:49:56 +02:00
1Computer1
dad0cd8e81 feat: external collection package (#2934)
* Use external collection package

* Complete typings

* Document properly base collection class

* Add clone since sort is now in-place

* Update for latest changes to package

* Fix whitespace

* Update docs link

* Oops

* Update Collection.js

* Update index.d.ts
2019-09-10 17:44:47 +02:00
bdistin
278f185b64 fix(rate-limits): reactions buckets need to be shared with sub-… (#3439) 2019-09-10 17:29:44 +02:00
newt
37ecf7b826 feat(constants): add verificationLevels (#3369)
* add Util.parseVerification()

* Made the code much cleaner.

* Removed method and created constant.

* Lint!

* refactor(constants): capitalize VerficiationLevels and add a typedef

* Changed VerificationLevels typedef to singular.

Co-Authored-By: Will Nelson <will@wnelson.xyz>
2019-09-10 16:12:27 +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
Ryan Munro
a6810e2eaa feat(Permissions): add new method Permissions#any (#3450)
* Add new method Permissions#any

* Update src/util/BitField.js

This is much better

Co-Authored-By: bdistin <bdistin@gmail.com>

* Remove unreachable code

* Gotta keep the linter happy

* Apply bdistin suggested change to both methods
2019-09-10 10:55:42 +02:00
iCrawl
4fc461c2f9 fix: browser-compatability
Fix #3453
2019-09-08 11:47:46 +02:00
Antonio Román
d252ddf9da docs: Document Message#author as nullable (#3464)
Fixes #3463
2019-09-08 09:49:10 +02:00
BannerBomb
5d95a4b264 fix: Util#splitMessage when destructured (#3456) 2019-09-03 16:24:20 +02:00
Schuyler Cebulskie
4b34f1acbe Remove past-tense naming on shard events 2019-08-31 17:14:48 -04:00
izexi
2a3fb705d0 fix(ChannelStore): return existing DMChannels within add() (#3438)
* fix: return existing DMChannels

* ref: group nested conditions
2019-08-28 11:13:09 +02:00
Gryffon Bellish
4c08812302 docs(ClientOptions): document unit of restRequestTimeout (#3449) 2019-08-26 18:52:30 +02:00
Amish Shah
c715ed9f8b voice: remove passes
(discord will begin dropping duplicated audio packets from tomorrow, you should not set passes > 1)
2019-08-22 12:15:20 +01:00
Carter
cc488a8bd3 fix: GuildMemberStore#_fetchMany (#3420)
* added DARK_MODE_INVISIBLE

added another constant color that makes embeds appear invisible on DARK mode.

* travis likes trailing commas

* fix: ref issue: #3414

* fix: removed a random color
2019-08-21 16:52:08 +01: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
Saya
e4309b23d5 feat: abort Requests that takes a lot of time to resolve (#3327)
* Add Request Timeout

* Add abort controller in packages

* Fix Lint Error.

* Fix Lint Errors

* Make Timeout Customizable & use finally

* Fixed a minor issue

* Fix eslint

* Update request timeout to use d.js client timeout methods.
2019-08-19 18:55:07 +02:00
SpaceEEC
c786867bd6 fix(Webhook): return raw data if the channel is unavailable
Fixes #3424
2019-08-18 11:45:28 +02:00
Khoo Hao Yit
1851f74770 fix(ReactionUserStore): remove method firing messageReactionRemove event twice (#3277) 2019-08-17 21:09:29 +02:00
Koyamie
12b48b7cbb fix(GuildMemberRoleStore): correctly reference the everyone role (#3434) 2019-08-17 20:57:14 +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
BannerBomb
b662678f21 feat/fix(Util): fix animated part of parseEmoji regex and make id optional (#3407)
* Small changes to parseEmoji regex

I just made a small change to the parseEmoji regex, this change will make an invalid emoji, like `<aname:id>` return as null, before this change it would return as an animated emoji because the name started with an `a` which would result in false positives, then the `?` I added to the end of `(\d{17,19})?` is used if someone provided an emoji as `:name:` or `a:name:` it will return the correct values but have an invalid id.

* Update Util.js

2nd Update: I changed the regex to output the results if you provide `<aemoji:123456789012345678>` and <:aemoji:123456789012345678>` which will output `{ animated: false, name: "aemoji", id: "123456789012345678" }` or `<:emojiname:>` which outputs `{ animated: false, name: "emojiname", id: null }` or `<a:emoji:>` which would output `{ animated: true, name: "emoji", id: null }`. Before this PR the method would return that the emoji was animated if you provided something like `<anemojiname:emoji_id>` because the name started with an `a`.
2019-08-17 18:07:58 +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
Amish Shah
c6e8fccbf0 voice: fix #3418
(kicking bot from voice channel doesn't allow it to rejoin)
2019-08-17 13:42:22 +01:00
Amish Shah
2c4d14a71b voice: remove redundant debug info 2019-08-14 19:22:41 +01:00
Amish Shah
f79f024343 fix: bots being unable to connect 2019-08-12 21:40:26 +01:00
Vlad Frangu
9e76f23314 fix(GuildMemberStore): reject BAN_RESOLVE_ID error instead of throwing it (#3425) 2019-08-10 12:22:11 +02:00
TNThacker2015
e645dd6358 feat: Util.splitMessage always return an array (#3035)
* Making Util.splitMessage always return an array

Util.splitMessage sometimes returns an array, but other times it returns a string. This should make it so that it always returns an array.

* jsdoc

Co-Authored-By: TNThacker2015 <37024464+TNThacker2015@users.noreply.github.com>

* docs(Util): remove superfluous space in docstring
2019-07-30 00:25:35 +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
Kitten King
d8516efa36 docs: fix typos (#3404) 2019-07-25 17:18:23 +02:00
MoreThanTom
547bf83100 feat(typings): constants export (#2915)
* Added typings for Constants export

* Full typing of list Constants

* Fix mistake in Package typing

* Cleanup for requested changes

moved fs import to import cluster
WSEvents using WSEventType to build type

* Satisfy tslint rules

* Update Constants.js

* Update index.d.ts

* Update index.d.ts

* Update index.d.ts

* Update index.d.ts

* Update index.d.ts

* Update index.d.ts

* Update index.d.ts

* Update index.d.ts
2019-07-12 17:02:45 +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