Skip to content

Releases: discord-php/DiscordPHP

Version 7.0.0 Release Candidate

06 Jan 04:32
13f03de
Compare
Choose a tag to compare
Pre-release

This is a major update with up to date features from Discord API
Read the migration guide here: https://github.com/discord-php/DiscordPHP/blob/master/V7_CONVERSION.md


Version 7.0.0 Release Candidate 4

This is expected to be final stage of the Release Candidate before going full v7.0.0 release.

  • Added Interaction::getFollowUpMessage() and Interaction::deleteFollowUpMessage() (#696)
  • Added Widget, which can be retrieved from Guild::getWidget() and Guild::getWidgetSettings(), also can be updated withGuild::updateWidgetSettings() (#695)
  • Added system_channel_flags Guild attribute as createable and updateable (#695)
  • Added description Guild attribute as updateable (#695)
  • Added cove image Scheduled Event attribute (#695)
  • Added User repository caching from event (#694)
  • Added ActionRow::clearComponents() (#699)
  • Fixed status Scheduled event attribute mistakenly made for createable as it was meant for updateable (#695)
  • Fixed Components builder (ActionRow, Button, SelectMenu) not allowing zero value (#699)

Version 7.0.0 Release Candidate 3

  • Added Guild Integration $guild->integrations (#692)
  • Added Event::INTEGRATION_CREATE, Event::INTEGRATION_UPDATE, Event::INTEGRATION_DELETE, Event::WEBHOOKS_UPDATE, and Event::USER_UPDATE (only for the current bot user) (#692)
  • Added User::displayname and Member::displayname string for discord user nickname or username with discriminator tag, e.g. D.PHP#6809 (#683)
  • Added Thread::archive() and Thread::unarchive() (#682)
  • Added ephemeral argument for Interaction::acknowledgeWithSource() (#679)
  • Added many missing attributes:
    • Added back Guild::welcome_screen attribute, but this will be only filled after Guild::getWelcomeScreen()
    • Added Message attributes: interaction and components, flag attributes: has_thread, ephemeral, and loading
    • Added Webhook attributes: source_guild, source_channel, and url
    • Added Role attribute tags
    • Added Application attributes icon, primary_sku_id, slug, summary, cover_image, useful to retrieve your bot information without going through Developers Portal page
  • Bump DiscordPHP-Http to version 9.0.9 marked to 4.0.10 (for docs)
  • Changed Event::MESSAGE_REACTION_REMOVE_EMOJI first callback argument to a MessageReaction Part (#692)
  • Changed Invite::guild_scheduled_event to return Guild ScheduledEvent Part
  • Changed end point for the bot self Member::setNickname() from Endpoint::GUILD_MEMBER_SELF_NICK to Endpoint::GUILD_MEMBER_SELF
  • Overhaul with the SPL Exception to use correct and closest meaningful exception
  • Fixed and changed Option::removeOption() to accept option name, as well Option::removeChoice() to accept choice name.
  • Fixed Member::getPermissions() on channel overwrites (#680).
  • Fixed AbstractRepository::freshen() not clearing the old Parts
  • Some code minor optimization

Breaking Changes

  • $message->author is now only return an User object and no longer return a Member object. $message->user is removed in favour of $message->author (#663)
  • Changed Interaction promise functions to use reject() instead of throwing exceptions
  • Removed leftover first argument Part on Guild Commands setOverwrite() however the function is now deprecated as discord is replacing the application command permissions system.

Version 7.0.0 Release Candidate 2

  • Added auto complete callback in listenCommand() or $command->setAutoCompleteCallback() (#676)
  • Added missing Application attributes bot_public, bot_require_code_grant, terms_of_service_url, privacy_policy_url, verify_key, team (#672)
  • Added Channel attribute permissions for interactions, and constants (#672)
  • Added Guild attribute icon_hash for template (#672)
  • Added Message attributes application_id, components for interactions (#672)
  • Added missing Invite attributes and constants (#672)
  • Added missing Video attribute proxy_url (#672)
  • Fixed wrong Message::ACTIVITY_JOIN_REQUEST constant value (#672)
  • Fixed permission errors (#675)
  • Fixed crash with Guild Welcome Screen attribute (#672)
  • Updated some phpdoc comment (#672)

Breaking Changes

  • Sticker use Discord\Parts\Channel\Sticker is now use Discord\Parts\Guild\Sticker (#673)
  • Application Command $discord->registerCommand() is now $discord->listenCommand() (#671)

Version 7.0.0 Release Candidate 1

  • Discord Gateway and REST API versions changed to Version 9
  • Compatibility update for PHP 8.1 (#599)
  • New Message Builder
  • Added Threads
  • Added Message Components (Buttons & Select Menu)
  • Added Stage Instance (#643)
  • Added Guild Scheduled Event (#648)
  • Added Guild Template (#647)
  • Added Guild Welcome Screen (#637)
  • Added Guild nsfw level & premium progress bar (#635)
  • Added Role icon (#619)
  • Added User banner & accent color (#608)
  • Added Member avatar (#618)
  • Added Member Timeout (#650)
  • Added Application Command for slash, context menu (user/message), and auto complete (#597)
    • If you previously linked DiscordPHP with DiscordPHP-Slash, you will no longer need DiscordPHP-Slash since it is now integrated, so you can start migrating your codes to DiscordPHP and enjoy the new features upgrade
    • Includes new Command Builder
  • Added Guild::createEmoji(), emoji update method, and emoji update events (#665)
  • Added Sticker update method, and sticker update events (#642)
  • Added Guild::searchMembers() (#614)
  • Added MessageReaction::delete() (#603)
  • Added audit log $reason parameter in some endpoint method where possible (#656)
  • Added example back (#659), check out the examples folder if you are beginner with DiscordPHP
  • Various fix with Voice Client, Audit Log, Command Client help embed, Guild splash, and many more
  • Code optimization & clean up

Documentation will be updated soon to cover the new features. Meanwhile check out the Official Discord API docs or ask us in the DiscordPHP server.

Breaking Changes

  • x86 (32 bit) PHP now requires ext-gmp for Permissions to work correctly (#661)
    • If your Bot currently does not deal with permissions, it will still work without the extension and a warning will show up, however please note that future changes with the API may enforce 32-bit PHP with GMP extension enabled for the Bot to run. It's recommended that you upgrade to 64-bit PHP.
  • Message::channel now return Channel|Thread (check out the conversion guide)
  • Message::stickers is now Message::sticker_items (#642)
  • The User/Member/Role :: getAvatarAttribute()/getBannerAttribute()/getIconAttribute() parameter $format is now default to null and will detect the default format & type (i.e. animated) (#657)
  • Deprecated old permission names: (#661)
    • use_slash_commands is now use_application_commands
    • use_public_threads is now create_public_threads
    • use_private_threads is now create_private_threads
    • manage_emojis is now manage_emojis_and_stickers
  • Guild::region is deprecated and may be removed in future release (#630)

Notes:

  • Expect breaking changes in this RC stage, with $message->author only return an User object and no longer return a Member object. $message->user will be removed in favour of $message->author (#663)
  • Expect a voice client refactor in a future release

Thank you to the following for contributions to this release:

Version 6.0.3

12 Dec 06:00
Compare
Choose a tag to compare
  • Update Pawl version, hot fix for web socket client not connecting

Full Changelog: v6.0.2...v6.0.3

Version 6.0.2

30 Aug 09:21
Compare
Choose a tag to compare
  • Added link attribute to Message - [#526]
  • Added filter function to Collection.
  • Fixed voice client error when using PHP 7.4
  • Added 'Discord Certified Moderator' flag to Member.
  • Fixed member attribute on MessageReaction returning the wrong type.
  • Add sendMessage to Member object - [#538]
  • Fixed command client mention prefix when mentioning nickname.
  • Use Embed inside command client - [#546]
  • Add pending flag to Member object - [#550]
  • Add updateRolePositions to Guild to change position of roles.
  • Added buttons to Activity - [#561]
  • Allow bulk updating of permission overwrites through Channel.
  • Fix emoji deletion on macOS.
  • Add __toString() function to Channel for channel mention - [#575]
  • Add function to escape Discord markdown - [#586]

Thank you to the following for contributions to this release:

Version 6.0.1

23 Apr 23:53
Compare
Choose a tag to compare
  • Fixed Message::member attribute returning a User - #523 @davidcole1340
  • Added loggerLevel changes to changelog and conversion guide - c11af7c
  • Updated documentation to reflect missed changes in 6.0.0 - #520 #521 @hemberger

Version 6.0.0

19 Apr 01:36
Compare
Choose a tag to compare

This version has also been known as v5.2.0, however, breaking changes caused the version to be increased. Please read the conversion guide when upgrading to check for any breaking changes that may affect you.

  • Discord Gateway and REST API versions changed to Version 8.
  • Removed unnecessary deferred promises from various parts and repositories.
  • Message::reply() now creates a "Discord reply" rather than the old way which was simply a mention with the content afterwards.
  • Tidied up and removed any unessacary deferred promises and promise binds.
  • Added Message::delayedDelete(int $ms) to delete a message after a delay.
  • Fixed member chunking not working when the guild is not considered 'large'.

Breaking Changes

  • PHP 7.4 is now the lowest supported version of PHP.
    • Versions as low as PHP 7.2 may still work, however, no support will be provided.
    • PHP 8.0 is now recommended, and CI is run on PHP 7.4 and 8.0.
  • With the update to gateway version 8, the GUILD_MEMBER and PRESENCE_UPDATE intents are not enabled by default.
    • You must first enable these in your Discord developer portal before enabling them in DiscordPHP. See the documentation for an example.
    • The loadAllMembers option requires the GUILD_MEMBER intent to be enabled.
  • The logging and httpLogger options have been removed.
    • All HTTP logging information is now redirected to the logger that you have passed, or the default logger.
    • For people that disabled logging by setting logging to false, you can create a logger with a NullHandler.
  • For voice client users, see the section below for breaking changes.

HTTP Client

  • HTTP client has been moved to a seperate package: DiscordPHP-Http
  • Improved rate limits by grouping requests by major parameters.

Voice Client

  • The voice client now requires at least PHP 7.4 to operate. It will not attempt to start on any version lower.
  • The voice client can now run on Windows, thanks to the introduction of socker pair descriptors in PHP 8.0 (see reactphp/child-process#85). As such, PHP 8.0 is required to run the voice client on Windows.
  • DCA has been rebuilt and refactored for better use with DiscordPHP. Note that the binaries have only been rebuilt for the amd64 architecture. The following platforms are now supported:
    • Windows AMD64
    • macOS AMD64
    • Linux AMD64
    • I'm happy to support DCA for other platforms if requested. Please ensure that your platform is supported by the Go compiler, see the supported list here.
  • The following functions no longer return promises, rather they throw exceptions and will return void. This is because none of these functions actually did any async work, therefore promises were redundant in this situation.
    • setSpeaking()
    • switchChannel()
    • setFrameSize()
    • setBitrate()
    • setVolume()
    • setAudioApplication()
    • setMuteDeaf()
    • pause()
    • unpause()
    • stop()
    • close()
    • getRecieveStream()
  • Expect a voice client refactor in a future release.

Version 6.0.0 Release Candidate 4

13 Apr 03:20
Compare
Choose a tag to compare
Pre-release

This version has also been known as v5.2.0, however, breaking changes caused the version to be increased.

  • Discord Gateway and REST API versions changed to Version 8.
  • Removed unnecessary deferred promises from various parts and repositories.
  • Message::reply() now creates a "Discord reply" rather than the old way which was simply a mention with the content afterwards.
  • Tidied up and removed any unessacary deferred promises and promise binds.
  • Added Message::delayedDelete(int $ms) to delete a message after a delay.
  • Fixed member chunking not working when the guild is not considered 'large'.

Breaking Changes

  • PHP 7.4 is now the lowest supported version of PHP.
    • Versions as low as PHP 7.2 may still work, however, no support will be provided.
    • PHP 8.0 is now recommended, and CI is run on PHP 7.4 and 8.0.
  • With the update to gateway version 8, the GUILD_MEMBER and PRESENCE_UPDATE intents are not enabled by default.
    • You must first enable these in your Discord developer portal before enabling them in DiscordPHP. See the documentation for an example.
    • The loadAllMembers option requires the GUILD_MEMBER intent to be enabled.
  • The logging and httpLogger options have been removed.
    • All HTTP logging information is now redirected to the logger that you have passed, or the default logger.
    • For people that disabled logging by setting logging to false, you can create a logger with a NullHandler.
  • For voice client users, see the section below for breaking changes.

HTTP Client

  • HTTP client has been moved to a seperate package: DiscordPHP-Http
  • Improved rate limits by grouping requests by major parameters.

Voice Client

  • The voice client now requires at least PHP 7.4 to operate. It will not attempt to start on any version lower.
  • The voice client can now run on Windows, thanks to the introduction of socker pair descriptors in PHP 8.0 (see reactphp/child-process#85). As such, PHP 8.0 is required to run the voice client on Windows.
  • DCA has been rebuilt and refactored for better use with DiscordPHP. Note that the binaries have only been rebuilt for the amd64 architecture. The following platforms are now supported:
    • Windows AMD64
    • macOS AMD64
    • Linux AMD64
    • I'm happy to support DCA for other platforms if requested. Please ensure that your platform is supported by the Go compiler, see the supported list here.
  • The following functions no longer return promises, rather they throw exceptions and will return void. This is because none of these functions actually did any async work, therefore promises were redundant in this situation.
    • setSpeaking()
    • switchChannel()
    • setFrameSize()
    • setBitrate()
    • setVolume()
    • setAudioApplication()
    • setMuteDeaf()
    • pause()
    • unpause()
    • stop()
    • close()
    • getRecieveStream()
  • Expect a voice client refactor in a future release.

Version 5.1.3

07 Apr 09:01
Compare
Choose a tag to compare
  • Added the recipient_id property to Channel - 8b3eb0e
  • Fixed private channel caching bug - 8b3eb0e
  • Fixed guild member chunking not working on some bot accounts - 96f1ce3

Version 5.2.0 Release Candidate 3

06 Mar 21:38
Compare
Choose a tag to compare
Pre-release
  • Fixed client not accepting intents in array form.

Version 5.2.0 Release Candidate 2

  • Fixed bug where websocket connection would fail and wouldn't reconnect.
  • Expanded on documentation.
  • Updated documentation marked version to ^2.0.0 due to security concern.
  • Disabled happy eyeballs connector as Discord does not use IPv6, and this causes an error when using a debugger.
  • Added options resolver for creating an invite.
  • Added the option to delete all reactions of a certain emoji from a message.
  • Fixed getting emoji ID for unicode emojis.
  • Fixed audit log query not accepting an Entry object.

Version 5.2.0 Release Candidate 1

  • PHP 7.4 is now the lowest supported version of PHP.
    • Versions as low as PHP 7.2 may still work, however, no support will be provided.
  • Discord Gateway and REST API versions changed to Version 8.
  • Removed unnecessary deferred promises from various parts and repositories.
  • Message::reply() now creates a "Discord reply" rather than the old way which was simply a mention with the content afterwards.
  • Tidied up and removed any unessacary deferred promises and promise binds.

HTTP Client

  • HTTP client has been moved to a seperate package: DiscordPHP-Http
  • Improved rate limits by grouping requests by major parameters.

Voice Client

  • The following functions no longer return promises, rather they throw exceptions and will return void. This is because none of these functions actually did any async work, therefore promises were redundant in this situation.
    • setSpeaking()
    • switchChannel()
    • setFrameSize()
    • setBitrate()
    • setVolume()
    • setAudioApplication()
    • setMuteDeaf()
    • pause()
    • unpause()
    • stop()
    • close()
    • getRecieveStream()
  • Although this is not deemed a breaking change it will break anything that uses the promise response.
  • Expect a voice client refactor in a future release.

Version 5.2.0 Release Candidate 2

05 Mar 20:12
Compare
Choose a tag to compare
Pre-release
  • Fixed bug where websocket connection would fail and wouldn't reconnect.
  • Expanded on documentation.
  • Updated documentation marked version to ^2.0.0 due to security concern.
  • Disabled happy eyeballs connector as Discord does not use IPv6, and this causes an error when using a debugger.
  • Added options resolver for creating an invite.
  • Added the option to delete all reactions of a certain emoji from a message.
  • Fixed getting emoji ID for unicode emojis.
  • Fixed audit log query not accepting an Entry object.

Version 5.2.0 Release Candidate 1

  • PHP 7.4 is now the lowest supported version of PHP.
    • Versions as low as PHP 7.2 may still work, however, no support will be provided.
  • Discord Gateway and REST API versions changed to Version 8.
  • Removed unnecessary deferred promises from various parts and repositories.
  • Message::reply() now creates a "Discord reply" rather than the old way which was simply a mention with the content afterwards.
  • Tidied up and removed any unessacary deferred promises and promise binds.

HTTP Client

  • HTTP client has been moved to a seperate package: DiscordPHP-Http
  • Improved rate limits by grouping requests by major parameters.

Voice Client

  • The following functions no longer return promises, rather they throw exceptions and will return void. This is because none of these functions actually did any async work, therefore promises were redundant in this situation.
    • setSpeaking()
    • switchChannel()
    • setFrameSize()
    • setBitrate()
    • setVolume()
    • setAudioApplication()
    • setMuteDeaf()
    • pause()
    • unpause()
    • stop()
    • close()
    • getRecieveStream()
  • Although this is not deemed a breaking change it will break anything that uses the promise response.
  • Expect a voice client refactor in a future release.

Version 5.1.2

02 Mar 05:53
Compare
Choose a tag to compare
  • Fixed bug where websocket connection would fail and wouldn't reconnect.
  • Expanded on documentation.
  • Updated documentation marked version to ^2.0.0 due to security concern.
  • Disabled happy eyeballs connector as Discord does not use IPv6, and this causes an error when using a debugger.
  • Added options resolver for creating an invite.
  • Added the option to delete all reactions of a certain emoji from a message.
  • Fixed getting emoji ID for unicode emojis.
  • Fixed audit log query not accepting an Entry object.