390 Commits

Author SHA1 Message Date
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
Rapptz
d921a03911 Fix bug where Guild.member_count would clear during update events
Fix #7656
2022-03-12 04:19:52 -05:00
chromacoat dreamkey
095aaa9ad1
Change wording of InvalidArgument removal in docs 2022-03-11 23:25:43 -05:00
Rapptz
71586836e1 Add Guild.vanity_url helper property 2022-03-10 05:06:02 -05:00
Steve C
9c054e9222
Remove unbound remnants of Guild._member_count
Since now it's always Optional[int]
2022-03-09 23:22:07 -05:00
Alex Nørgaard
03687fb616
Change Guild.member_count to Optional[int] 2022-03-09 23:06:07 -05:00
Rapptz
987e27dfce Revert all Guild.chunk changes
This method should *not* return a list of members due to the way it is
used internally.
2022-03-07 22:14:38 -05:00
Stocker
e15415413b
Add missing parameters to certain methods
- slowmode_delay and reason in Message.create_thread
- slowmode_delay in TextChannel.create_thread
- reason in Guild.edit_widget
2022-03-06 23:00:50 -05:00
Sebastian Law
b77cf500a2
Make description parameter of Guild.create_sticker non-Optional
Co-authored-by: James Hilton-Balfe <gobot1234yt@gmail.com>
2022-03-06 18:43:42 -05:00
AmeyWale
a909c1ff06
Added vanity_url_code field in class guild 2022-03-06 03:50:13 -05:00
I. Ahmad
8360e4af8d
Add premium_progress_bar_enabled attribute on Guild 2022-03-06 03:17:28 -05:00
Stocker
07a1311bf4
Change Guild.preferred_locale to use the Locale enum 2022-03-05 23:30:51 -05:00
Rapptz
82464419ce Fix black reformatting on guild file
Black seems to not properly run on 2nd commits on PRs so this slid
through.
2022-03-05 22:14:58 -05:00
Steve C
e9c91a535a
Fix Guild.chunk() returning list of members 2022-03-05 22:10:58 -05:00
JDJG Inc. Official
e69428a841
Add with_counts support for Client.fetch_guild
Co-authored-by: Stocker <44980366+StockerMC@users.noreply.github.com>
Co-authored-by: Danny <Rapptz@users.noreply.github.com>
2022-03-05 22:09:19 -05:00
Rapptz
13e102b6b9 Add default parameter to CommandTree.sync
I'm not sure how I feel about this, since explicitly passing
guild=None seems better.
2022-03-05 22:02:33 -05:00
Scrumpy (Jay)
3d0309ca4a
Documenting that guild.chunk() returns list of members 2022-03-05 21:32:27 -05:00
Rapptz
d44328d3ea Remove region from Guild.__slots__
This also fixes up some docstrings
2022-03-01 05:54:26 -05:00
Nadir Chowdhury
3c6279b947
Implement Guild Scheduled Events 2022-03-01 01:00:04 -05:00
mniip
d5f23dbfc2
Fix docs for Guild.mfa_level 2022-02-27 21:18:01 -05:00
jack1142
e44dd3dee5
Fix position of versionadded and add new versionchanged 2022-02-27 21:16:45 -05:00
Josh
2b69b5d545
Remove discord.InvalidArgument
This uses TypeError and ValueError instead.
2022-02-26 01:44:49 -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
285069de08 Fix types in guild.py 2022-02-22 04:00:46 -05:00
Josh
70b577e94b
Fix typing in voice related files 2022-02-22 02:37:22 -05:00
Rapptz
c406951532 Fix typing errors in Guild.audit_logs 2022-02-20 11:21:07 -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
4dbe1af32f
Update sphinx and fix documentation issues 2022-02-19 22:35:32 -05:00
Kaylynn Morgan
588cda0996
Refactor AsyncIter to use 3.6+ asynchronous generators 2022-02-19 21:58:13 -05:00
jack1142
dc19c6c7d5
Add positional-only arguments in more places 2022-02-19 20:28:01 -05:00
Maya
0b77b52da2
Add support for animated guild banners
https://github.com/discord/discord-api-docs/pull/3948
2022-02-18 20:28:36 -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
Izhar Ahmad
efec816de2
Make arguments positional only in 2 get methods
- Member.get_role
- Guild.get_member
2021-08-25 20:52:20 -04:00
Rapptz
490bbffc93 Remove in-place edits and return fresh instances instead
Fixes #4098
2021-08-23 23:46:50 -04:00
Nadir Chowdhury
d4c683738d
default to 0 instead of 15 for Guild.sticker_limit 2021-08-19 06:21:52 -04:00
Rapptz
b73f02b9c3 Remove deprecated TextChannel.active_threads for Guild version
This also fills in the ThreadMember data from the endpoint
2021-08-18 01:52:24 -04:00
la
8ac5cdc314
Fix Guild.fetch_channel not working for threads 2021-08-18 00:45:45 -04:00
Nadir Chowdhury
60d82cf908
implement guild stickers 2021-07-30 21:25:41 -04:00
Rapptz
0d3bd3083c Add Guild.get_channel_or_thread helper method
The name might change in the future, unsure.
2021-07-29 01:22:07 -04:00
Nadir Chowdhury
f14e584304
Sync Guild.features to documentation 2021-07-10 03:13:14 -04:00
Alex Nørgaard
d1dc41ec2f
Fix Client.fetch_channel not returning Thread 2021-07-03 21:35:31 -04:00
Nadir Chowdhury
2d597e310b
Fix Interaction.channel being None in threads 2021-07-01 07:49:44 -04:00
Rapptz
1aeec34f84 Typehint Member and various typing fixes 2021-06-30 01:28:35 -04:00
Rapptz
2beee8be14 Type hint channel.py 2021-06-29 03:37:52 -04:00
Rapptz
a75cd93acc Fix Guild.vanity_invite causing an error when guild has it unset
FIx #7103
2021-06-28 01:03:46 -04:00
RobotHanzo
75477b2995
Fix incorrect typehints in Guild.create_role 2021-06-28 00:05:40 -04:00
Rapptz
f0c76a13d3 Fix guild documentation not showing up for some methods 2021-06-11 05:25:06 -04:00
Rapptz
0dd4c4c08c Don't use class attribute syntax for Guild typings 2021-06-10 07:50:35 -04:00
Rapptz
7dccbace78 Refactor Guild to support type hints
This patch also does the following:

* Sets some parameters to be positional only
* Changes Guild.edit to use the MISSING sentinel
* Changes the various create_channel methods to be type safe
* Changes many parameters from Optional[T] to use MISSING
* Changes Guild.create_role to use MISSING sentinel

This refactor is mostly partial but lays a decent foundation
2021-06-08 10:56:26 -04:00