Releases: AlexFlipnote/discord.http
Version 3.0.0
What's Changed
- Implement file support for modal by @AlexFlipnote in #23
- Update error message for SectionComponent validation by @Neppkun in #24
- Quart -> aiohttp by @AlexFlipnote in #25
- Change wording in discord_http.User for User.display_name_styles to make more sense
- Added more docstrings around classes and functions to improve documentation
- Fixed create soundboard for guild function not working properly
- Removed two dependencies: yarl and Quart
- Added fallback method for Asset where you can show missing texture bytes instead
- Added more debug logging to improve debugging
- Added more utils for common tasks done both by developers and maintainer
- Fixed type errors and parsing errors due to None values
- Added missing API endpoints
New Contributors
Why removing dependencies
Because I wish to keep the project minimal, only have the bare minimum to run it and no bloat. If there is a little to no reason to have something around, you bet it will be removed instantly. Yarl was just wasteful where I only used it for very simple tasks, so I replaced it with a self-made class that takes advantage of Python's built-in libraries while keeping somewhat the same syntax as yarl.
Quart's removal was because I was already using aiohttp for HTTP requests out and WebSocket service, so I might as well take advantage of the fact that it also provides a way of serving a web server to get the POST requests from Discord API, while also being a faster alternative to the previous web server the library was using. For people who were using the backend code method, you will have to change your code to adapt, otherwise if you did not use a custom backend, you can skip this part and continue hosting your bot as per usual.
Full Changelog: 2.4.1...3.0.0
Version 2.4.1
What's Changed
- Feat: TextDisplayComponent and Mentionable selects support by @AlexFlipnote in #21
- Display name styles by @AlexFlipnote in #22
What's new
- Added
enums.DisplayNameEffectType - Added
enums.DisplayNameFontType - Added new
User.display_name_stylesthat returnsDisplayNameStyle - Added missin enums in places
- Added support for role/mentionable selection on modals
Full Changelog: 2.4.0...2.4.1
Version 2.4.0
This is a breaking change due to behaviour change of modals in discord_http.View
- Fixed icon and banner for guild during
guild_updateevent not updating - Fixed type hints on various places
- Removed duplicate docs for arguments, parameters and attributes
- Improved docs quality by adding more attribute docs
- Filled missing flags for Permissions
- Improved error for when you do not return a response with interactions
- Added support for modal string select (phase 1 of modal update, breaking change)
How does the breaking change work?
In modals, you basically have to spesify what kind of item you are adding. Before, it was simply this example:
from discord_http import Modal
modal = Modal(title="Hello world")
modal.add_item(label="Test")However now, to do the same thing, you will have to do the following:
from discord_http import Modal, TextInputComponent
modal = Modal(title="Hello world")
modal.add_item(TextInputComponent(
label="Test"
))This addition is to make sure that if they plan to add more things in later time, it will be dynamic and easy to update it without causing yet another breaking change. You can honestly just slap TextInputComponent on all current modal.add_item() if anything, it might work, but it will remain labeled as a breaking change since it breaks current structure too much.
Version 2.3.1
- Add docs for MessageReaction (oops)
- Add more functions (like fetching who reacted) and easier use for MessageReaction
Version 2.3.0
- Added better support for
User/Member.avatar_decorationandUser/Member.nameplate - Added
User/Member.primary_guild(aka. clan) - Improved docs on classes to show attributes as well for website
- Improved "Getting Started" to be both more accurate and more explaining
- Added ability to customise interaction url path (Default is
/aka. root of the URL) - Fixed command description not removing whitespace due to docstring
- Breaking changes for User/Member, which is the reason for version bump
- Collectible is removed
- Avatar decoration is rebranded to be more full
- Avatar decoration data is removed
- Removed clan in favour of primary_guild as name instead
Version 2.2.6
Full Changelog: 2.2.5...2.2.6
- Added support for websocket
on_entitlement_createandon_entitlement_update - Updated
enums.EntitlementTypeto have all types - Added support for gradient role colours
- Improved "offline mode" support with a native
Client.offline_run()
Version 2.2.5
Full Changelog: 2.2.4...2.2.5
- Replaced native
jsonwithorjsonfor more speedy output to Quart and everything else - Error handling for
discord_http.Viewimproved a bit more - Added alias for
Context.is_bot_dm()to make life easier to check things - Added more
strshortcuts toViewcomponents to make building more convinient - Upgraded dependency versions to the latest since it supports it
Version 2.2.4
It was bumped from 2.2.3 to 2.2.4 due to critical bug for Cogs commands
What's Changed
- Expose
avatar_decoration_dataand forward new props to members by @Snazzah in #17 - use member object props for avatar decorations by @Snazzah in #18
- Better support for custom activity for bots by @SirRomey
What's new?
- More strict type checking to improve code quality
- Fix
guild_createnot adding guild back to cache if it comes back from being unavailable - Improved Py3.11 types for commands like
def cmd(test: str | None = None)to indicate that it's an optional str - Added shortcuts in components V2 to make building easier and less block'y
- Resolved Component: type-16 error that is unavailable for bots but now becomes silent
- Added aliases and better support for avatar decoration between Member/User
- Resolved bug where using
Asset.replacewould remove the?size=Xfrom the query URL - Added support for forwarding messages
- Added support for
Member | User | Nonewhere the bot will then not care about which user object it returns (useful for user commands) - Updated components v2 to support the new limit of 40 components instead of 10
- Added support for components
View()for webhook requests - Shards now expose more information during dispatch of the co-responding events with the use of
discord_http.gateway.ShardClosePayload - Added before/after invoke for both global and per-command usecase
- Global:
@Client.before/after_invoke() - Command:
@commands.before/after_invoke(func)
- Global:
- Added
Client.wait_for()being available if gateway is enabled
Full Changelog: 2.2.2...2.2.3
Version 2.2.2
What's Changed
- Update avatar decoration and add User.collectibles by @Snazzah in #16
- Added
Message.forward - Improved type hints to support both Optional/Union and (example)
str | Nonetypes correctly. - Fixed
Asset.resizeremoving size if you change format. - Fixed non-useable component error from Components V2 if a user-only component is used
- Added shortcuts to
MediaGalleryComponent,MediaGalleryItemandSectionComponentto useFileor/andAsset - Fixed unavailable guilds on boot not being cached if enabled and becoming available again
- Resolved bugs here and there
Full Changelog: 2.2.1...2.2.2
Version 2.2.1
- Better docs
- Fixing broken types for decorators especially
- Fixing broken
open()fordiscord_http.File