343 Commits

Author SHA1 Message Date
Rapptz
26beabb740 Document default_auto_archive_duration accepted values 2023-01-21 00:12:21 -05:00
Rapptz
e802a87916 Synchronise Guild.features type hints with newest entries 2023-01-10 17:01:20 -05:00
Lia Marie
dc194409c4
Update Guild.query_members docstring 2023-01-10 16:22:51 -05:00
Eta
4122bef8ee
Fix async iterators requesting past their bounds
This affects Messageable.history, ScheduledEvent.users, 
Client.fetch_guilds, and Guild.audit_logs.

To illustrate the problem, Messageable.history counted returned
messages to tell when to stop iteration, but did so before filtering
away those past the before or after boundaries. When both 
oldest_first=False and an after boundary were provided, this led to the
history iterator continuing to retrieve messages older than the after
boundary, which would then all be filtered away, continuing until the
message limit or the beginning of the entire channel was reached. 

A similar situation would also occur with oldest_first=True and a
before boundary provided.

This commit changes the logic in these methods to count items after
filtering, so they stop requesting more as soon as the in-bounds items
are exhausted.
2022-11-27 01:43:24 -05:00
Jonah Lawrence
d7b6a2ad12
Fix usage of single backticks to links and code-blocks 2022-10-26 04:26:56 -04:00
Willy
ba2ad58017
Add default value to Guild.ban docs 2022-10-08 02:11:01 -04:00
Omkaar
c30a2f3ca0
Refactor certain f-strings and literals 2022-10-02 17:50:56 -04:00
Steve C
ce06beeb6c
Fix permissions-based docstrings to be more consistent 2022-09-17 14:07:39 -04:00
Ionite
6981eb69c4
Normalize type formatting in TypeError
Normalize most mixed usages of `__class__`, `__class__!r`, 
`__class__.__name__!r` to the standard form of 
`__class__.__name__`
2022-09-12 15:25:55 -04:00
Rapptz
1c163b66cd Fix stage_instances and guild_schedule_events clearing on GUILD_UPDATE 2022-09-06 17:45:01 -04:00
Josh
df21c26195
Add support for toggling discoverable and invites_disabled features 2022-09-03 11:51:21 -04:00
Rapptz
aa0acf1d56 Add more options to Guild.create_forum 2022-09-01 05:10:41 -04:00
Puncher
896513b3ac
Clarify some documentation in Guild features
Add afk_timeout unit and changed VIP_REGIONS feature description
2022-08-30 00:50:17 -04:00
Josh
e57617e157
Add support for delete_message_seconds ban argument 2022-08-28 02:06:57 -04:00
mirnovov
5039b967a0
Document get_thread not fetching archived threads 2022-08-16 16:59:20 -04:00
Bryan Forbes
d707019348
Bump Pyright to 1.1.265, fix type errors, and remove unnecessary ignores 2022-08-04 22:46:02 -04:00
Soheab
dc8cbc073e
Fix small typo in Guild.edit docstring 2022-07-27 22:28:54 -04:00
z03h
9f1c511b47
Fix Guild.afk_channel and VoiceState.channel being None at startup 2022-07-26 09:38:36 -04:00
Rapptz
d52bc5d225 Cache voice members on start up if MemberCacheFlags.voice is enabled
Fix #8209
2022-07-20 23:12:36 -04:00
Rapptz
87bc79e6e3 Change certain sequences to use a special proxy type instead of list
This is to speed up cases where someone is just querying the length
of the underlying sequence. If anything else is done to the sequence
then it is copied from the original iterator.

This change should be mostly transparent.
2022-07-19 01:58:58 -04:00
z03h
04aeff660b
Add automod types to audit log 2022-07-07 19:30:03 -04:00
apple502j
b95db674c0
Fix some typos 2022-06-27 22:34:45 -04:00
Alex Nørgaard
5426d19dc7
Implement AutoMod 2022-06-27 00:47:52 -04:00
Sarthak Upadhyay
1ba290d8c6
Update sticker limit in _PREMIUM_GUILD_LIMITS 2022-06-14 00:37:58 -04:00
Alex Nørgaard
6a58cabf5c
Add Guild.create_forum and CategoryChannel.create_forum 2022-06-09 00:56:31 -04:00
Rapptz
75d57ab3ce Fix warning in entity_type reassignment 2022-06-06 12:26:05 -04:00
Rapptz
3fe9fc92eb Automatically infer entity_type when passing concrete channels
This affects Guild.create_scheduled_event and ScheduledEvent.edit

Previously, you would always be required to pass it in. However, it
makes sense to not repeat yourself if you already know it's a stage
channel or a voice channel due to the type information.
2022-06-06 08:56:04 -04:00
Nadir Chowdhury
e2d0193531
Implement WelcomeScreen 2022-05-21 21:26:06 -04:00
Rapptz
573bb32a1e Fallback to an unavailable guild instead of an Object in interactions 2022-05-14 06:50:27 -04:00
xCirno
1607b6978b
Add widget_enabled attribute to Guild 2022-05-10 22:59:22 -04:00
I. Ahmad
e3ea4706f9
[types] Remove auto archive duration related guild features 2022-05-05 01:46:09 -04:00
z03h
9deac84eac
Fix wrong variable being returned in audit logs 2022-05-02 04:34:01 -04:00
z03h
619bc50e5d
Add application command permissions to audit log 2022-05-01 18:59:57 -04:00
Rapptz
0851e03f00 Allow creating a news channel in create_text_channel 2022-04-30 07:12:16 -04:00
Rapptz
f045b7d63c Fix BanEntry not being exported despite being documented 2022-04-23 01:53:21 -04:00
Mad Cat
c885aa0b99
Add NotFound to ban docstring 2022-04-18 17:23:40 -04:00
lightningyx
482bd11ac7
Fix Guild.fetch_member docstring
Co-authored-by: Danny <Rapptz@users.noreply.github.com>
2022-04-18 06:26:32 -04:00
Daniel Grant
18a6881fd9
Add NotFound to unban docstring 2022-04-17 02:19:20 -04:00
Rapptz
d98ee567d4 Add Guild.forums property
Ran an informal poll in the official server and this name won over the
alternative Guild.forum_channels property name
2022-04-13 17:40:16 -04:00
I. Ahmad
6265723a35
Add support for archive duration in Guild.create_text_channel 2022-04-11 17:21:08 -04:00
Rapptz
23f6876492 Add initial support for forum channels
Closes #7652
2022-04-06 23:02:58 -04:00
Rapptz
58db635229 Fix parameter validation in Guild.query_members 2022-04-03 08:07:01 -04:00
Rapptz
ca9fd355e8 Fix typo in Guild.bans docstring 2022-04-01 00:26:33 -04:00
Rapptz
9acf1db076 Support ban endpoint pagination 2022-04-01 00:09:02 -04:00
Rapptz
def035bf9a Remove StoreChannel and any references to it 2022-03-28 00:09:19 -04:00
jack1142
5ffa3e85de
Update comments after # type: ignore to be compatible with PEP 484 2022-03-27 22:26:34 -04:00
I. Ahmad
181fc42b9b
Remove outdated note and example 2022-03-23 04:19:55 -04:00
curiositIy
c6d113c843
Change PUBLIC to COMMUNITY in Guild.edit 2022-03-22 18:11:43 -04:00
Rapptz
5f7c5abe0a Change ban type hints to use int instead of Literal 2022-03-18 21:45:15 -04:00
Rapptz
4a76464ac9 Fix return value of Guild.chunk 2022-03-18 07:37:28 -04:00