Rodry
b4afcf8236
docs: general cleanup and improvements ( #6299 )
...
Co-authored-by: DaStormer <40336269+DaStormer@users.noreply.github.com >
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com >
Co-authored-by: SpaceEEC <spaceeec@yahoo.com >
2021-08-05 20:34:06 +01:00
Advaith
54d6a3a070
feat(Sticker): updates, sticker packs, and guild stickers ( #5867 )
...
Co-authored-by: SpaceEEC <spaceeec@yahoo.com >
Co-authored-by: Antonio Román <kyradiscord@gmail.com >
Co-authored-by: Tiemen <ThaTiemsz@users.noreply.github.com >
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com >
Co-authored-by: BannerBomb <BannerBomb55@gmail.com >
Co-authored-by: Noel <icrawltogo@gmail.com >
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com >
2021-07-20 00:17:21 +01:00
ckohen
7346621d15
feat: api v9 and threads ( #5570 )
...
Co-authored-by: Noel <icrawltogo@gmail.com >
Co-authored-by: Amish Shah <dev@shah.gg >
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com >
Co-authored-by: SynthGhost <60333233+synthghost@users.noreply.github.com >
Co-authored-by: SpaceEEC <24881032+SpaceEEC@users.noreply.github.com >
Co-authored-by: Elliot <elliot@maisl.fr >
Co-authored-by: Antonio Román <kyradiscord@gmail.com >
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com >
2021-06-24 20:48:29 +01:00
SpaceEEC
ee025b0558
fix(Permissions): allow admin to override in the missing method ( #5911 )
2021-06-24 20:42:40 +01:00
Jan
f7643f7bbe
feat: interactions ( #5448 )
...
Co-authored-by: izexi <43889168+izexi@users.noreply.github.com >
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com >
Co-authored-by: Advaith <advaithj1@gmail.com >
Co-authored-by: Shiaupiau <stu43005@gmail.com >
Co-authored-by: monbrey <rsm999@uowmail.edu.au >
Co-authored-by: Tiemen <ThaTiemsz@users.noreply.github.com >
Co-authored-by: Carter <carter@elhnet.net >
2021-05-07 17:22:33 +02:00
Amish Shah
eec7cf7634
feat: stage channels ( #5456 )
...
* feat: add stage channel type
* feat: initialise stage channel structure
* feat: add STAGE_MODERATOR permissions bitfield
* fix: typo in permissions
* fix(Channel): type selection logic
* feat: add rtcRegion to StageChannel and VoiceChannel
* feat: rtc region editing for stage and voice channels
* feat: stage channel userLimit
* feat: add stage channels to exports
* feat: add computed properties to stage channel
* feat(VoiceState): include stage channel in docs
* feat: allow ability to join stage channels
* feat(StageChannel): join and leave methods
* docs: add StageChannel link in GuildChannel docs
* feat(VoiceState): suppress and requestToSpeakTimestamp
* feat(StageChannel): setRequestToSpeak
* refactor(StageChannel): update setRequestToSpeak
* feat(VoiceState): add moveToSpeakers and moveToAudience
* feat(VoiceState): add methods to move in/out of speakers
* feat(VoiceState): add stage channel sanity checks
* feat(Permissions): add REQUEST_TO_SPEAK
* feat(VoiceState): simpler methods
* docs(VoiceState): add documentation for new methods
* refactor: remove unused error message
* chore: remove debug statements
* chore: revert changes to package-lock.json
* docs(VoiceState): clarify suppress
* docs(VoiceState): add missing @type param
* feat(StageChannel): remove nsfw property
* fix(VoiceState): check permissions in channel
Co-authored-by: Advaith <advaithj1@gmail.com >
* fix(VoiceState): instantiate error with new
Co-authored-by: BannerBomb <BannerBomb55@gmail.com >
* refactor(VoiceState): more readable API route builder
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com >
* style(VoiceState): fix lint errors
* docs(VoiceState): add example usage for new methods
* docs: setRTCRegion examples
* chore: update typings
* fix(VoiceState): calculate permissions for self
* refactor(VoiceState): tidy up implementation
* Update src/structures/VoiceState.js
Co-authored-by: Jan <66554238+vaporox@users.noreply.github.com >
* refactor: vaporox's suggestions
* style(VoiceState): fix linter errors
* chore: update typings
* chore: remove unused error message
* refactor(VoiceState): use optional chaining
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com >
* chore: move getters below constructor in typings
* refactor(StageChannel): optional chaining
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com >
* style(VoiceState): fix lint errors
* docs: fix incorrect types
Co-authored-by: izexi <43889168+izexi@users.noreply.github.com >
* Update src/structures/VoiceChannel.js
Co-authored-by: izexi <43889168+izexi@users.noreply.github.com >
* Update src/structures/VoiceChannel.js
Co-authored-by: izexi <43889168+izexi@users.noreply.github.com >
* refactor(VoiceState): use optional chaining
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com >
* refactor(StageChannel): remove permission override check in joinable
* refactor: make ChannelTypes a proper enum
* Use createEnum
Co-authored-by: izexi <43889168+izexi@users.noreply.github.com >
* chore: remove unused code from Constants
* refactor(StageChannel): remove unnecessary getters
* chore: update typings
* refactor: introduce BaseGuildVoiceChannel class
* refactor(VoiceChannel): reduce code duplication
* feat: export BaseGuildVoiceChannel
* chore: update typings
* docs: fix typos
* refactor: move setRTCRegion to BaseGuildVoiceChannel
* feat(VoiceState): remove permission checks
* chore: update typings
* Apply suggestions from code review
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com >
Co-authored-by: Jan <66554238+vaporox@users.noreply.github.com >
* chore: update esm exports and typings
* Update src/structures/VoiceState.js
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com >
Co-authored-by: Advaith <advaithj1@gmail.com >
Co-authored-by: BannerBomb <BannerBomb55@gmail.com >
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com >
Co-authored-by: Jan <66554238+vaporox@users.noreply.github.com >
Co-authored-by: izexi <43889168+izexi@users.noreply.github.com >
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com >
2021-04-14 13:35:55 +01:00
Sugden
ee5bc1a5c4
refactor: switch api and gateway to V8 ( #4879 )
...
Co-authored-by: Jan <66554238+Vaporox@users.noreply.github.com >
2021-02-11 18:10:35 +01:00
Phineas
ea19faa411
Change domain to discord.com ( #4160 )
2020-06-19 11:46:59 +02:00
KhaaZ
5b9cdc5cd2
feat(Permissions): Adds VIEW_GUILD_INSIGHTS ( #3928 )
2020-03-17 21:37:40 +00:00
SpaceEEC
bca4b038a5
docs(BitField): document constructors of deriving classes ( #3903 )
2020-03-07 06:00:48 +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
bdistin
5154850a54
Add Stream permission ( #3309 )
...
* Add Stream permission
* update docs, and DEFAULT
Created a new guild to test DEFAULT
* update typings
2019-05-30 08:26:49 +01:00
Gus Caplan
42505b78c1
chore: add strict mode ( #2974 )
2018-12-03 15:19:10 -06:00
bdistin
c62f01f0e4
refactor(BitField): base class for Permissions, ActivityFlags, Speaking ( #2765 )
...
* abstract BitField from Permissions
* reduce useless code, improve docs
* add a ReadOnly identifier to the return type of Bitfield#freeze()
https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-1.html#partial-readonly-record-and-pick
* fix the RangeError
* update docs, convert Speaking and ActivityFlags to bitfields
* fix some docs
* Fix Speaking BitField oops
* docs for oops
* more incorrect docs
* Fix incorrectly named property
* add new classes to index
* fix missing @extends docs
* default bitfield resolve to 0, and cleanup defaulting everywhere
Also removes GuildMember#missiongPermissions() alias that had incorrect behavior
* Breaking: Rename Overwrite allowed and denied to allow and deny
To be consistent with the api's naming
* fix setSpeaking usage to bitfields instead of booleans
* fix speaking bug in playChunk
* docs: Updated typings
* fix: BitFieldResolvable should use RecursiveArray
* bugfix/requested change
* typings: Cleanup (#2 )
* typings: Fix BitField#{toArray,@@iterator} output type
* typings: correct PermissionOverwrites property names and nitpicks
2018-08-21 11:56:41 +02:00
Yukine
b38f537da8
feat: Add new Permission PRIORITY_SPEAKER ( #2698 )
2018-08-03 20:19:19 -04:00
Will Nelson
cf7dcba1a5
Add toJSON methods ( #1859 )
...
* tojson things
* fix client
* ignore private properties
* remove extra property descriptors
* handle primitive flattening
* remove unused import
* add toJSON to collections
* reduce stateful props
* state
* allow custom prop names when flattening
* fix client
* fix build
* fix flatten docs
* remove guild.available, cleanup permissions, remove arbitrary id reduction
* fix util import
* add valueOf as needed, update member props
* fix incorrect merge
* update permissionoverwrites and permissions
remove serialization of permissions in PermissionOverwrites#toJSON.
change Permissions#toJSON to serialize permissions, by default excluding
admin checks.
* change Permissions#toJSON to return the primitive
* Permissions#toJSON explicitly return bitfield
2018-03-01 23:00:21 -06:00
Will Nelson
2a9fdef9e5
add valueOf method to permissions ( #2363 )
2018-02-28 16:48:06 +01:00
John Leuenhagen
d5b0cf9ffb
Permissions improvements ( #2126 )
...
* add Permissions.toArray()
* accept Permissions objects to Permissions.missing()
* accept Permissions as parameter to Permissions.has()
* style fixes
* remove redundant line, update JSDoc for Permission.resolve()
* JSDoc, style, and checkAdmin fixes
* add Permissions.resolveToObject()
* accept PermissionResolvable to Permissions.missing()
* remove `resolveToObject`, fix constructor JSDoc
* remove redundant parameter type
* fix `Permissions.missing()`
* fix checkAdmin
* update Permissions.toArray() description
* eliminate ambiguity in Permissions.toArray() description
* add backticks to permission example
* remove irrelevant type in Permission ctor description
* use this.constructor to properly support OOP
* use simplified approach for Permissions.toArray()
* fix return type on Permissions.toArray()
* move `Permissions#toArray` to more suitable position
* bitwise approach to `Permissions#missing`
* allow `Permissions` to be iterated over
* don't checkAdmin on return array
* remove unnecessary conditional
* fix JSDoc indentation
* use simpler & more reliable approach for missing()
* update PermissionResolvable typedef
2018-01-18 02:17:50 -06: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
bdistin
98b81fac38
fix permissions not resolving correctly ( #1928 )
2017-09-10 16:27:04 +01:00
bdistin
98582cd1b7
Permissions Cleanup ( #1643 )
...
* fix Permissions.add/remove, by completely changing what they do
* permissions cleanup
Removes overwrite._denied and overwrite._allowed in favor of overwrite.denied.bitfield and overwrite.allowed.bitfield
uses the modified Permissions.add and Permissions.remove to clean up existing code
fixes GuildMember.missingPermissions
changes Permissions add/remove to reverse loops for speed, changes resolve to allow the number 0 as a valid permission.
* Revert createChannel overwrite.allow / overwrite.deny for arrays of {allow:bitfield, deny:bitfield}
Documentation should be improved here, although I would need advice. I believe a overwrite object typedef is needed, to show the structure of the object, and also include that collections may be used for this, rather than arrays.
* api router fix for overwritePermissions
* add Permissions.freeze, and change all returned Permissions to immutable instances
* Make Permissions a permission resolveable
change role.permissions to be an instance of Permissions
* Make permissions.add/remove return a new instance if the instance is frozen
* Fix invalid error
* Update GuildChannel.js
* Update Guild.js
* fix bad merge
2017-09-09 22:07:39 +02:00
iCrawl
2aa2f73c74
Docs cleanup
2017-08-17 20:04:01 +02:00
Gus Caplan
23d42d7e22
permissions rename :3 ( #1788 )
...
* permissions rename :3
* Update Permissions.js
* Update TextChannel.js
* Update GuildChannel.js
2017-08-17 18:27:50 +02:00
Gus Caplan
63e54982f4
Errors Standardization ( #1246 )
...
* errors and stuff
* more errors
* all the errors
* fix build
2017-06-25 18:48:05 +01:00
Schuyler Cebulskie
28dc3e6a2e
Utilise Object.values for Permissions.ALL
2017-06-02 00:36:34 -04:00
Crawl
79253544ea
Relink permission#FLAGS on docs
2017-05-20 21:04:31 +02:00
Crawl
ca926ee404
Remove all deprecated methods / props
2017-05-14 20:15:55 +02:00
Amish Shah
8bab9fb122
Add VIEW_AUDIT_LOG to Permissions docs
2017-05-01 11:15:09 +01:00
Amish Shah
1a69331f0c
Merge branch 'master' of https://github.com/hydrabolt/discord.js
2017-04-29 21:09:56 +01:00
Amish Shah
c40252381b
Deprecate all the things
2017-04-29 21:09:53 +01:00
Gus Caplan
4127cf6e40
Experimental support for Audit Logs ( #1403 )
...
* start audit logs
* make better var types so gawdl3y doesn't shit on this
* add constructor stuff
* make more changes
* add entry creation
* add methods
* make it all work hopefully
* aaa
* aaaa
* i wish i could test this locally
* fix users, guild when i feel like it
* make guild prop non-enumerable
* make better types
* change nouns
* e
* Update GuildAuditLogs.js
* Update GuildAuditLogs.js
* Update GuildAuditLogs.js
* eek
* Update GuildAuditLogs.js
* Update GuildAuditLogs.js
* friggin trailing spaces
* Update GuildAuditLogs.js
* docs!
* Update GuildAuditLogs.js
* reason stuff
* Update GuildAuditLogs.js
* Update GuildAuditLogs.js
* support before/after for pagination
* Update Guild.js
* Update GuildAuditLogs.js
* mfw using github web editor
* fix build
* Update Guild.js
* amazing cache fuckery shit evil
* cool stuff
* make building audit logs nicer
* ban endpoint stuff
* dox
* <.<
2017-04-29 20:34:57 +01:00
SpaceEEC
ecb8655dac
Document readonly and private properties ( #1338 )
2017-04-03 20:05:36 +02:00
Schuyler Cebulskie
58068fdae9
Change check for array/number, and fix docs
2017-03-21 02:53:08 -04:00
Schuyler Cebulskie
245bd91101
Allow Permissions constructor to take array of perms
2017-03-21 02:45:11 -04:00
Schuyler Cebulskie
79278bccb4
Fix Permissions.resolve to return a combined bitfield for arrays
2017-03-21 02:16:18 -04:00
Schuyler Cebulskie
b926cd0dcd
Remove redundant Markdown
2017-03-06 12:22:53 -05:00
Schuyler Cebulskie
6211119928
Fix Permissions.ALL on Node 6
2017-03-06 12:21:42 -05:00
Schuyler Cebulskie
4f7e0c41ee
Doc fixes
2017-03-06 02:34:39 -05:00
Schuyler Cebulskie
30dd9be900
Pass the member into new Permissions instances
2017-03-06 02:29:35 -05:00
Schuyler Cebulskie
16fe48d405
Overhaul Permissions utilities (EvaluatedPermissions no more)
2017-03-06 02:22:42 -05:00