Commit Graph

711 Commits

Author SHA1 Message Date
44a44e938f Reformat entire project with ruff instead of black 2025-08-18 20:16:10 -04:00
983a9b8f94 Use Unpack where it's possible 2025-08-15 05:36:36 -04:00
50caa3c82c Add support for components V2
Co-authored-by: Michael H <michael@michaelhall.tech>
Co-authored-by: Soheab <33902984+Soheab@users.noreply.github.com>
Co-authored-by: owocado <24418520+owocado@users.noreply.github.com>
Co-authored-by: Jay3332 <40323796+jay3332@users.noreply.github.com>
Co-authored-by: Danny <1695103+Rapptz@users.noreply.github.com>
2025-08-13 20:37:23 -04:00
6ec2e5329b Deprecate with_expiration param in fetch_invite 2025-08-12 03:18:24 -04:00
13dc9c9d16 Fix miswording in docstring about bot.emojis 2025-07-15 19:46:32 -04:00
4862ea22fd Return invites when deleting them via Invite.delete or Client.delete_invite 2025-06-20 15:03:29 -04:00
adb93f4a60 Add deprecation warning to create_guild functions 2025-06-20 14:36:24 -04:00
7f511360b8 Fix wait_for overloads 2025-02-08 21:00:11 -05:00
418a7915e6 Add raw presence update evemt 2025-01-21 04:49:50 -05:00
tom
2c3938dd51 Update Client.create_application_emoji docs 2025-01-15 19:01:09 -05:00
cf6d7ff47a Fix bug due to typo in async pagination of entitlements loop 2025-01-15 18:50:40 -05:00
eb15aa8ca4 Add exclude_deleted parameter to Client.entitlements 2025-01-15 18:19:49 -05:00
fcd9239b33 Add Client.fetch_guild_preview method 2025-01-15 18:01:47 -05:00
58b6929aa5 Add SKU subscriptions support 2024-10-09 18:04:14 -04:00
d10e70e04c [docs] Fix spelling 2024-10-09 17:29:15 -04:00
a70217a719 Support for Soundboard and VC effects 2024-10-09 17:05:17 -04:00
df4b1c88df Move MissingApplicationID to top-level discord namespace 2024-08-31 08:51:56 -04:00
a08f7a14ff Add a warning if interaction endpoint URL is set on login 2024-08-29 03:04:14 -04:00
463b4bd570 Add support for application emojis
Co-authored-by: DA344 <108473820+DA-344@users.noreply.github.com>
Co-authored-by: Danny <1695103+Rapptz@users.noreply.github.com>
2024-08-28 17:15:15 -04:00
34bf026a02 Add support for get sticker pack 2024-08-28 16:15:26 -04:00
da89fbc8b5 Re-add client connector param
This provides paths for users to handle two entirely seperate issues

- Alternative fix for #9870
- Allows handling of windows sslcontext issues without a global
truststore.inject_into_ssl() use
2024-08-28 15:23:51 -04:00
e43bd8692c Add support for Polls
Co-authored-by: owocado <24418520+owocado@users.noreply.github.com>
Co-authored-by: Josh <8677174+bijij@users.noreply.github.com>
Co-authored-by: Trevor Flahardy <75498301+trevorflahardy@users.noreply.github.com>
2024-05-10 06:14:12 -04:00
88f62d85d2 Ensure Client.close() has finished in __aexit__
This wraps the closing behavior in a task. Subsequent callers of
.close() now await that same close finishing rather than short
circuiting. This prevents a user-called close outside of __aexit__ from
not finishing before no longer having a running event loop.
2024-05-04 23:20:36 -04:00
4e03b170ef Update pyright version 2024-02-20 13:36:02 -05:00
99618c823a Add support for premium app integrations
Co-authored-by: Danny <1695103+Rapptz@users.noreply.github.com>
Co-authored-by: Lucas Hardt <lucas.hardt@fu-berlin.de>
Co-authored-by: Andrin S. <65789180+Puncher1@users.noreply.github.com>
2023-10-19 07:27:29 -04:00
3827671bf7 Fix misleading Error documentation for Client.fetch_guild 2023-09-05 11:40:59 -04:00
7c3868ef3b Add Client.remove_dynamic_items 2023-09-03 02:52:05 -04:00
a852f90358 Add support for dynamic items that parse custom_id for state 2023-09-03 02:52:05 -04:00
66689e16e8 Add with_counts param to fetch_guilds 2023-05-19 20:47:16 -04:00
4828355f9e Change and add params in AppInfo and PartialAppInfo 2023-03-30 08:37:34 -04:00
0ea098567c [commands] Use ... for Command and Group typing 2023-03-01 22:47:17 -05:00
1de3562f34 Fix partially uknown typing errors 2023-03-01 19:14:50 -05:00
e6ef43139f Don't store finished views/modals 2023-02-13 23:52:40 -05:00
bbba8c650f Add missing generic parameters on various Interaction parameters 2023-01-19 07:00:16 -05:00
3c91d2163e Fix overload for on_raw_typing in wait_for 2023-01-17 00:48:29 -05:00
bf860b0b07 Add support for generic ClientT in Interaction 2023-01-16 21:57:54 -05:00
ef7d740524 Add overload for audit_log_entry_create 2023-01-16 20:38:53 -05:00
375a001da8 Add overloads for all the events in the event reference
Co-authored-by: Sebastian Law <sebnlaw@gmail.com>
Co-authored-by: Josh <8677174+bijij@users.noreply.github.com>
2023-01-16 20:36:00 -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
ce06beeb6c Fix permissions-based docstrings to be more consistent 2022-09-17 14:07:39 -04:00
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
2bf2bfc9b4 Add utils.setup_logging to help set up logging outside of Client.run 2022-08-17 22:53:03 -04:00
7be0779b65 Add root_logger setting to Client.run
This allows people one way to use the colour logger globally
2022-08-16 20:03:02 -04:00
3802780f77 Change a lot of logging INFO calls to be less verbose
Some of the logs were only useful for debug scenarios, so they have
been downgraded to DEBUG. Others were in INFO but supposed to be in
WARNING so those were upgraded.
2022-08-15 10:21:36 -04:00
584c22f642 Raise TypeError when token is not a string
Co-authored-by: Danny <1695103+Rapptz@users.noreply.github.com>
2022-08-14 05:39:06 -04:00
7da2048d1a Add support for resume_gateway_url 2022-08-10 22:47:27 -04:00
dc81ff76c4 Add Object.type to Objects where a type can be determined 2022-08-09 08:18:58 -04:00
2d586ae805 Add initial support for app command localisation 2022-08-05 22:35:30 -04:00
d707019348 Bump Pyright to 1.1.265, fix type errors, and remove unnecessary ignores 2022-08-04 22:46:02 -04:00
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