-
-
Notifications
You must be signed in to change notification settings - Fork 480
Add support for guild scheduled events
#211
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
Merged
Merged
Changes from all commits
Commits
Show all changes
80 commits
Select commit
Hold shift + click to select a range
caf16f0
Add http methods for guild events
Middledot 0d3ed5d
Fix typo
Middledot 21bc443
Add GuildEvent enums
Middledot ef88b01
Re-add indent
Middledot 48303db
Create guild_events.py
Middledot 3c3ca79
Add `guild_scheduled_event_id` to get_invite
Middledot 1deb0ac
Remove british language
Middledot 5724ea7
Update license
Middledot aa89eaa
Fix typo
Middledot 79ef31f
Implement `event.edit()`
Middledot 21b9d20
Merge branch 'Pycord-Development:master' into cog-fixes
Middledot ab2d47c
Merge pull request #1 from Middledot/master
Middledot a673d42
Merge pull request #2 from Middledot/guild-events
Middledot aaaf749
rename and change format
Middledot 6048532
Rename scheduled_event to guild_event
Middledot dc69c91
Add .delete()
Middledot 736c750
Half-create client GuildEvent methods
Middledot 41318d6
Delete discord/app directory
Middledot 2e124b3
Mutiple changes
Middledot c81fd51
Change pycord to discord again
Middledot c08711b
test
Middledot cd77b43
Delete testing.py
Middledot 29ef3fd
Merge branch 'Pycord-Development:master' into guild-events
Middledot 9eb90eb
Update errors.py
Middledot 2fd2520
Merge branch 'guild-events' into master
Middledot 5b8a357
Merge pull request #5 from Middledot/master
Middledot f8b6872
Merge pull request #6 from Middledot/guild-events
Middledot 9ec16bb
Implement location editing in GuildEvent.edit
Middledot 4907577
Rename Location to GuildEventLocation
Middledot 52839c2
Make some changes to GuildEvent.edit
Middledot ace20db
Add Guild Events intent
Middledot 3aa9315
Add http method parameters
Middledot d06a834
Add event parsers
Middledot ce7c687
Correct previous commit
Middledot e65adff
Correct previous commit again
Middledot 748b586
Invite + typing stuff
Middledot f7e413c
Add guild event imports to __init__.py
Middledot 0aae3f6
Add more typing, remove enum, subclass from object
Middledot d7aa743
Few corrections
Middledot 754c601
Multiple changes and fixes
Middledot 0023ec4
Some changes
Middledot c81608c
GuildEvent and guild_event to scheduled event
Middledot 34f553a
Fix enum.py alignment
Middledot 2f423e6
Merge branch 'Pycord-Development:master' into master
Middledot bf33efb
Merge branch 'Pycord-Development:master' into master
Middledot f944709
Sync
Middledot 7c96dba
Merge branch 'master' of https://github.com/Middledot/pycord
Middledot 337c956
Add missing parameters and formatting
Middledot 3c83c54
Add fetch and create scheduled event methods to guild obj
Middledot 5dbbada
Cleanup mistakes
Middledot b6a65ea
Add basic cache implmentation for ScheduledEvent
Middledot d990b24
Added some typing and more cache impl
Middledot 7e5c22b
Semi-complete cache impl
Middledot ee811a4
General Docs, format, and structure changes
Middledot d6c4356
Fixes for previous commit
Middledot fa203e1
Rename location to value in types
Middledot 47ad5d1
First time testing fixes
Middledot 34df184
Add support for scheduled_event_user_add/remove events
Middledot 25ae5d7
Add to raw_models
Middledot 5e7f668
Audit Log + Invite + Docs!!!
Middledot 5498cc0
Document gateway events #1
Middledot 73534b7
Properly document intent and events
Middledot cc5386e
Implement event.users (finally)
Middledot 1c2806b
Add support for datetime objects
Middledot 90a06d2
Document event.users properly and typehint http method responses
Middledot fcd9abc
Rename user_count -> subscriber_count & users -> subscribers
Middledot bebe6c5
Merge branch 'Pycord-Development:master' into master
Middledot 79c9657
Add audit log transformers
Middledot fd3df4e
Fix mistakes and inconsistensies found while reviewing
Middledot 59ab5af
Add scheduled event typing for types.guild.Guild
Middledot d8e964e
Add transformation for location in audit logs
Middledot 9488f1d
whoops
Middledot 18dabb1
Last minute fixes + reason param
Middledot b783450
Fix typos found in codespell
Middledot c89711b
Fix minor typing details
Middledot dc94d80
Fix more typing issues
Middledot efa932f
Add __str__ to ScheduledEventLocation
Middledot 20b2e44
Revert op container formatting changes
Middledot d8b6dfb
Add missing typing to .interested
Middledot 565ddd4
Fix some docs and event functionality
Middledot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,64 +1,64 @@ | ||
| """ | ||
| The MIT License (MIT) | ||
| Copyright (c) 2021-present Pycord Development | ||
| Permission is hereby granted, free of charge, to any person obtaining a | ||
| copy of this software and associated documentation files (the "Software"), | ||
| to deal in the Software without restriction, including without limitation | ||
| the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
| and/or sell copies of the Software, and to permit persons to whom the | ||
| Software is furnished to do so, subject to the following conditions: | ||
| The above copyright notice and this permission notice shall be included in | ||
| all copies or substantial portions of the Software. | ||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS | ||
| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
| FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
| DEALINGS IN THE SOFTWARE. | ||
| """ | ||
|
|
||
| from ..errors import DiscordException | ||
|
|
||
| __all__ = ( | ||
| "ApplicationCommandError", | ||
| "CheckFailure", | ||
| "ApplicationCommandInvokeError", | ||
| ) | ||
|
|
||
| class ApplicationCommandError(DiscordException): | ||
| r"""The base exception type for all application command related errors. | ||
| This inherits from :exc:`discord.DiscordException`. | ||
| This exception and exceptions inherited from it are handled | ||
| in a special way as they are caught and passed into a special event | ||
| from :class:`.Bot`\, :func:`.on_command_error`. | ||
| """ | ||
| pass | ||
|
|
||
| class CheckFailure(ApplicationCommandError): | ||
| """Exception raised when the predicates in :attr:`.Command.checks` have failed. | ||
| This inherits from :exc:`ApplicationCommandError` | ||
| """ | ||
| pass | ||
|
|
||
| class ApplicationCommandInvokeError(ApplicationCommandError): | ||
| """Exception raised when the command being invoked raised an exception. | ||
| This inherits from :exc:`ApplicationCommandError` | ||
| Attributes | ||
| ----------- | ||
| original: :exc:`Exception` | ||
| The original exception that was raised. You can also get this via | ||
| the ``__cause__`` attribute. | ||
| """ | ||
| def __init__(self, e: Exception) -> None: | ||
| self.original: Exception = e | ||
| super().__init__(f'Application Command raised an exception: {e.__class__.__name__}: {e}') | ||
| """ | ||
| The MIT License (MIT) | ||
| Copyright (c) 2021-present Pycord Development | ||
| Permission is hereby granted, free of charge, to any person obtaining a | ||
| copy of this software and associated documentation files (the "Software"), | ||
| to deal in the Software without restriction, including without limitation | ||
| the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
| and/or sell copies of the Software, and to permit persons to whom the | ||
| Software is furnished to do so, subject to the following conditions: | ||
| The above copyright notice and this permission notice shall be included in | ||
| all copies or substantial portions of the Software. | ||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS | ||
| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
| FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
| DEALINGS IN THE SOFTWARE. | ||
| """ | ||
|
|
||
| from ..errors import DiscordException | ||
|
|
||
| __all__ = ( | ||
| "ApplicationCommandError", | ||
| "CheckFailure", | ||
| "ApplicationCommandInvokeError", | ||
| ) | ||
|
|
||
| class ApplicationCommandError(DiscordException): | ||
| r"""The base exception type for all application command related errors. | ||
| This inherits from :exc:`discord.DiscordException`. | ||
| This exception and exceptions inherited from it are handled | ||
| in a special way as they are caught and passed into a special event | ||
| from :class:`.Bot`\, :func:`.on_command_error`. | ||
| """ | ||
| pass | ||
|
|
||
| class CheckFailure(ApplicationCommandError): | ||
| """Exception raised when the predicates in :attr:`.Command.checks` have failed. | ||
| This inherits from :exc:`ApplicationCommandError` | ||
| """ | ||
| pass | ||
|
|
||
| class ApplicationCommandInvokeError(ApplicationCommandError): | ||
| """Exception raised when the command being invoked raised an exception. | ||
| This inherits from :exc:`ApplicationCommandError` | ||
| Attributes | ||
| ----------- | ||
| original: :exc:`Exception` | ||
| The original exception that was raised. You can also get this via | ||
| the ``__cause__`` attribute. | ||
| """ | ||
| def __init__(self, e: Exception) -> None: | ||
| self.original: Exception = e | ||
| super().__init__(f'Application Command raised an exception: {e.__class__.__name__}: {e}') | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.