Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for GuildScheduledEvent #6493

Merged
merged 102 commits into from Dec 23, 2021
Merged

Conversation

iShibi
Copy link
Contributor

@iShibi iShibi commented Aug 21, 2021

Please describe the changes this PR makes and why it should be merged:

Adds support for GuildScheduledEvent:

Todo:

  • Add GuildScheduledEvent class
  • Define all properties of the GuildScheduledEvent class
  • Add Complete Documentation
  • Add Complete Typings
  • Get List of guild events in a guild
  • Post Create a guild event
  • Get A guild event by id
  • Delete Delete a guild event
  • Patch Modify a guild event
  • Add GuildEventManager
  • Add MANAGE_EVENTS permission
  • Add Gateway Events:
    • GUILD_SCHEDULED_EVENT_CREATE
    • GUILD_SCHEDULED_EVENT_UPDATE
    • GUILD_SCHEDULED_EVENT_DELETE
    • GUILD_SCHEDULED_EVENT_USER_ADD
    • GUILD_SCHEDULED_EVENT_USER_REMOVE
  • Add GuildScheduledEvent related audit logs

Status and versioning classification:

  • Code changes have been tested against the Discord API (⚠️ Lots of changes, I def missed some)
  • I know how to update typings and have done so
  • This PR changes the library's interface (methods or parameters added)

Copy link
Contributor

@ImRodry ImRodry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this is still a draft, these are just some notes for the future mostly

src/util/Constants.js Outdated Show resolved Hide resolved
src/util/Constants.js Outdated Show resolved Hide resolved
src/structures/GuildEvent.js Outdated Show resolved Hide resolved
src/structures/GuildEvent.js Outdated Show resolved Hide resolved
src/managers/GuildEventManager.js Outdated Show resolved Hide resolved
src/managers/GuildEventManager.js Outdated Show resolved Hide resolved
Copy link
Contributor

@ImRodry ImRodry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some things I noticed after going through this PR again
I also think you should change Invite#INVITES_PATTERN to /discord(?:(?:app)?\.com\/invite|\.gg(?:\/invite)?)\/([\w-]{2,255})$/gi (added the $ at the end to match the end of the string) and add a new property under GuildEvent called EVENTS_PATTERN with the following regex: /discord(?:(?:app)?\.com\/invite|\.gg(?:\/invite)?)\/[\w-]{2,255}\?event=([0-9]{17,19})/gi

src/structures/GuildEvent.js Outdated Show resolved Hide resolved
src/structures/GuildEvent.js Outdated Show resolved Hide resolved
src/structures/GuildEvent.js Outdated Show resolved Hide resolved
src/util/Constants.js Outdated Show resolved Hide resolved
src/util/Constants.js Outdated Show resolved Hide resolved
@iCrawl iCrawl added this to the Version 13.3 milestone Oct 4, 2021
@iCrawl iCrawl modified the milestones: Version 13.3, Version 13.4 Oct 28, 2021
@iCrawl iCrawl modified the milestones: Version 13.4, Version 13.x Nov 11, 2021
@SpaceEEC SpaceEEC removed the discord label Nov 16, 2021
This was referenced Nov 17, 2021
@iShibi iShibi changed the title feat: add support for GuildEvent feat: add support for GuildScheduledEvent Nov 17, 2021
@iShibi iShibi marked this pull request as ready for review November 17, 2021 04:22
@iShibi
Copy link
Contributor Author

iShibi commented Nov 17, 2021

This is ready for review

src/managers/GuildScheduledEventManager.js Outdated Show resolved Hide resolved
src/managers/GuildScheduledEventManager.js Show resolved Hide resolved
src/managers/GuildScheduledEventManager.js Outdated Show resolved Hide resolved
src/managers/GuildScheduledEventManager.js Outdated Show resolved Hide resolved
src/managers/GuildScheduledEventManager.js Outdated Show resolved Hide resolved
typings/index.d.ts Outdated Show resolved Hide resolved
src/managers/GuildScheduledEventManager.js Outdated Show resolved Hide resolved
src/managers/GuildScheduledEventManager.js Outdated Show resolved Hide resolved
typings/index.d.ts Outdated Show resolved Hide resolved
src/structures/GuildScheduledEvent.js Outdated Show resolved Hide resolved
iShibi and others added 26 commits December 22, 2021 23:11
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
@iCrawl iCrawl merged commit 1316fd4 into discordjs:main Dec 23, 2021
@iShibi iShibi deleted the feat-guild-event branch January 12, 2022 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet