Skip to content

Releases: AlexFlipnote/discord.http

Version 3.0.0

22 Oct 21:45
c581050

Choose a tag to compare

What's Changed

  • 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

10 Sep 19:44
0bdde60

Choose a tag to compare

What's Changed

What's new

  • Added enums.DisplayNameEffectType
  • Added enums.DisplayNameFontType
  • Added new User.display_name_styles that returns DisplayNameStyle
  • 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

26 Aug 07:38
bb5f4a9

Choose a tag to compare

This is a breaking change due to behaviour change of modals in discord_http.View

  • Fixed icon and banner for guild during guild_update event 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

21 Jul 21:22
8d45f02

Choose a tag to compare

  • Add docs for MessageReaction (oops)
  • Add more functions (like fetching who reacted) and easier use for MessageReaction

Version 2.3.0

16 Jul 21:18
0b3ca22

Choose a tag to compare

  • Added better support for User/Member.avatar_decoration and User/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

24 Jun 12:14
cea118e

Choose a tag to compare

Full Changelog: 2.2.5...2.2.6

  • Added support for websocket on_entitlement_create and on_entitlement_update
  • Updated enums.EntitlementType to have all types
  • Added support for gradient role colours
  • Improved "offline mode" support with a native Client.offline_run()

Version 2.2.5

02 Jun 20:10
f00f5f2

Choose a tag to compare

Full Changelog: 2.2.4...2.2.5

  • Replaced native json with orjson for more speedy output to Quart and everything else
  • Error handling for discord_http.View improved a bit more
  • Added alias for Context.is_bot_dm() to make life easier to check things
  • Added more str shortcuts to View components to make building more convinient
  • Upgraded dependency versions to the latest since it supports it

Version 2.2.4

15 May 11:47
daa290d

Choose a tag to compare

It was bumped from 2.2.3 to 2.2.4 due to critical bug for Cogs commands

What's Changed

  • Expose avatar_decoration_data and 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_create not 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.replace would remove the ?size=X from the query URL
  • Added support for forwarding messages
  • Added support for Member | User | None where 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)
  • Added Client.wait_for() being available if gateway is enabled

Full Changelog: 2.2.2...2.2.3

Version 2.2.2

23 Apr 05:11
834d17a

Choose a tag to compare

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 | None types correctly.
  • Fixed Asset.resize removing size if you change format.
  • Fixed non-useable component error from Components V2 if a user-only component is used
  • Added shortcuts to MediaGalleryComponent, MediaGalleryItem and SectionComponent to use File or/and Asset
  • 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

19 Apr 22:44
d8756bd

Choose a tag to compare

  • Better docs
  • Fixing broken types for decorators especially
  • Fixing broken open() for discord_http.File