18 Commits

Author SHA1 Message Date
Puncher
60094b17a9
Fix create_scheduled_event param handling 2023-03-05 17:28:50 -05:00
z03h
8f86170767
Don't require some args for ScheduledEvent.edit 2023-02-27 06:18:13 -05:00
Rapptz
02031d08fb Publicly expose ScheduledEvent.creator_id
Fix #9201
2023-01-24 09:39:22 -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
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
Bryan Forbes
d707019348
Bump Pyright to 1.1.265, fix type errors, and remove unnecessary ignores 2022-08-04 22:46:02 -04:00
Josh
c9f777c873
Fix type annotations to adhere to latest pyright release 2022-06-12 15:30:45 -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
Rapptz
9df6aa86c8 Fix state modification endpoints on ScheduledEvent not working
Closes #8114
2022-06-06 08:34:19 -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
Nadir Chowdhury
c95d12dcfc
Prevent KeyError when removing scheduled event user 2022-03-11 20:50:49 -05:00
metro
9b65b5ce2e
Fix scheduled event payload and docstring type 2022-03-09 21:31:14 -05:00
Nadir Chowdhury
70876d7f51
ScheduledEvent.description can be Optional 2022-03-09 20:42:25 -05:00
z03h
cb7ecf0938
Fix errors in ScheduledEvent and add url property 2022-03-09 07:38:13 -05:00
Nadir Chowdhury
b20ab5ae5d
image key is now optional for scheduled events 2022-03-05 22:09:55 -05:00
Nadir Chowdhury
3c6279b947
Implement Guild Scheduled Events 2022-03-01 01:00:04 -05:00