54 Commits

Author SHA1 Message Date
jack1142
5ffa3e85de
Update comments after # type: ignore to be compatible with PEP 484 2022-03-27 22:26:34 -04:00
z03h
8993b7f5fe
Add cover_image to AuditLogDiff 2022-03-26 08:48:02 -04:00
Alex Nørgaard
7a815a97af
Fix audit logs for INVITE_CREATE returning None 2022-03-22 18:04:52 -04:00
Stocker
5aa696ccfa
Fix typing issues and improve typing completeness across the library
Co-authored-by: Danny <Rapptz@users.noreply.github.com>
Co-authored-by: Josh <josh.ja.butt@gmail.com>
2022-03-13 23:52:10 -04:00
Alex Nørgaard
4c00b8110c
Add audit log event transformer for AuditLogEntry.target 2022-03-08 21:20:23 -05:00
Nadir Chowdhury
3c6279b947
Implement Guild Scheduled Events 2022-03-01 01:00:04 -05:00
Rapptz
0eb2f32399 Remove VoiceRegion enum and Guild.region attribute
This has been marked deprecated by Discord and it was more or less
usually out of date due to the pace they added them anyway.
2022-02-23 10:03:13 -05:00
mniip
ff90e7e747
GUILD_UPDATE audit logs 2022-02-22 08:48:26 -05:00
Josh
437d451d4e
Fix typing in Audit Logs 2022-02-21 23:32:59 -05:00
Rapptz
88b520b5ab Reformat code using black
Segments where readability was hampered were fixed by appropriate
format skipping directives. New code should hopefully be black
compatible. The moment they remove the -S option is probably the moment
I stop using black though.
2022-02-20 08:04:58 -05:00
Josh
352dcf9557
Add missing audit log properties 2022-02-18 20:36:51 -05:00
jack1142
783513726f
Add support for role icons
* Document ROLE_ICONS guild feature
https://github.com/discord/discord-api-docs/pull/3847

* Add support for role icons
https://github.com/discord/discord-api-docs/pull/3847

* Add support for role icon/emoji changes in audit log
https://github.com/discord/discord-api-docs/pull/3847
2022-02-17 11:28:03 -05:00
Nadir Chowdhury
60d82cf908
implement guild stickers 2021-07-30 21:25:41 -04:00
Nadir Chowdhury
154c90ef59
Add audit log events for threads 2021-07-28 19:57:42 -04:00
Rapptz
49f8073262 Fix Permission serialisation in audit logs
Fix #7171
2021-07-04 19:13:21 -04:00
Nadir Chowdhury
c2df574b2a
Add audit log entries for stage instances 2021-06-09 08:09:05 -04:00
Nadir Chowdhury
94bbdc154c
update types subpackage with latest docs 2021-06-07 23:20:47 -04:00
James
369951fd80
Typehint audit_logs.py 2021-06-02 02:28:47 -04:00
Rapptz
d78e5d979d Refactor and type hint invites 2021-05-29 05:49:19 -04:00
Nadir Chowdhury
51df7496db
Add AuditLogChanges.rules_channel/public_updates_channel 2021-05-01 06:47:22 -04:00
Nadir Chowdhury
1765cdffb1
Use Asset for AuditLogChanges and add more entries 2021-04-25 09:53:38 -04:00
z03h
304229071f
Add VoiceChannel.video_quality_mode 2021-04-17 08:10:41 -04:00
Rapptz
40cf397ce6 Permission related fixes for v8 2021-04-11 00:39:13 -04:00
Rapptz
d85805ab6d First pass at supporting v8 API 2021-04-11 00:39:13 -04:00
Nadir Chowdhury
3e92196a2b
Add typings for audit logs, integrations, and webhooks 2021-04-10 02:53:24 -04:00
Rapptz
99fc950510 Use f-strings in more places that were missed. 2021-04-08 06:02:47 -04:00
Nadir Chowdhury
89456022cf
Add __all__ to remaining modules 2021-04-07 02:30:32 -04:00
Rapptz
9d39b135f4 Modernize code to use f-strings
This also removes the encoding on the top, since Python 3 does it by
default. It also changes some methods to use `yield from`.
2021-04-04 07:03:53 -04:00
Nadir Chowdhury
31bbf7434b
Allow AuditLogEntry to be Hashable 2021-03-01 08:55:53 -05:00
Nadir Chowdhury
63ec23bac2
Code optimisations and refactoring via Sourcery 2021-02-24 21:26:51 -05:00
Nihaal Sangha
69bdc3a184
Change copyright year to present 2021-01-15 05:28:11 -05:00
Rapptz
6071607176 Bump copyright year to 2020
Closes #2510
2020-01-19 20:03:00 -05:00
Josh B
7df5effbb7 Add new audit log entry types. Fix issue with unknown entry types 2019-11-26 05:16:53 -05:00
NCPlayz
3c9bcc2851 Improve documentation 2019-06-07 19:27:46 -04:00
Rapptz
2cd6d771ec Make __repr__ slightly more detailed and add a few missing ones.
This includes raw events (which didn't have any) and a few other
types that were missing them. Upon review some more useful fields were
added to the repr output which would be more useful during debugging.
2019-05-26 02:32:47 -04:00
Rapptz
6f26a4aad8 Improve performance of value -> enum by about 5x. 2019-04-15 21:30:47 -04:00
Dante Dam
9656a21ebe Bumped copyright years to 2019. 2019-01-28 22:22:50 -05:00
Rapptz
7f4c57dd5a Fix overwriting of AuditLogDiff.roles for multiple $add/$remove keys 2018-12-31 08:39:28 -05:00
Rapptz
8b18fa307b Add support for default notification level in audit logs and Guild.edit 2018-11-25 01:42:33 -05:00
Rapptz
836ae73040 Add support for AuditLogDiff.slowmode_delay. 2018-09-25 21:56:41 -04:00
Rapptz
3d03dbc451 Change internal role storage in Guild to a dict instead of a list.
This adds the following APIs:

* Guild.get_role

This removes the following APIs:

* Guild.role_hierarchy

To compensate for the removed APIs, Guild.roles is now a sorted list
based on hierarchy. The first element will always be the @everyone
role.

This speeds up access at the cost of some memory, theoretically.
2018-09-24 21:08:48 -04:00
BeatButton
a4d1599ce9 Change docstrings to raw-strings 2018-09-14 22:55:27 -04:00
Tobotimus
3112e1c17e Add intersphinx 2018-01-06 17:23:59 -05:00
Rapptz
13c6a0a17a Add support for Guild.system_channel 2017-08-17 18:14:52 -04:00
Rapptz
d8360411ea Fix cases where user_id can be None in audit logs. 2017-08-15 06:12:57 -04:00
Rapptz
1cf50f8054 Fix AuditLogDiff.__iter__ to return an actual iterable.
Fixes #589.
2017-06-04 20:32:09 -04:00
Rapptz
b13d437bb9 Don't assume the inviter is always there. 2017-05-31 05:01:19 -04:00
Rapptz
6b063deda9 Only set the attribute if it isn't None. 2017-05-10 14:57:26 -04:00
Rapptz
140be3e4c8 Make AuditLogDiff.roles an empty list instead of None. 2017-05-07 12:09:28 -04:00
Rapptz
2b44876955 Fix NameError when making things Object in audit logs. 2017-05-07 01:06:15 -04:00