Releases: discord-php/DiscordPHP
Version 7.0.1
- Fixed
TextInput::setRequired()
default value false to true - Added
dnsConfig
Discord options, makeVoiceClient
to use system configuration DNS resolver first before Google Public DNS
Full Changelog: v7.0.0...v7.0.1
Version 7.0.0
New API:
- Thread
- Interactions: Application Commands (slash, message, user context menu), Message Components, Autocomplete, Modal
- Guild: Template, Stage Instance, Scheduled Event, Template, Welcome Screen, Integration events, Webhook events
- Role: Icon
- Member: Avatar, Timeout
New features:
- Message Builder
- Command Builder
- Components Builder
- Create & Manage Emoji
- Manage Stickers
- Audit log reason
Read the RC-stage release notes for more details: https://github.com/discord-php/DiscordPHP/releases/tag/v7.0.0-RC4
Conversion guide: https://github.com/discord-php/DiscordPHP/blob/master/V7_CONVERSION.md
Full Changelog: v6.0.2...v7.0.0
Version 7.0.0 Release Candidate
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()
andInteraction::deleteFollowUpMessage()
(#696) - Added Widget, which can be retrieved from
Guild::getWidget()
andGuild::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
, andEvent::USER_UPDATE
(only for the current bot user) (#692) - Added
User::displayname
andMember::displayname
string for discord user nickname or username with discriminator tag, e.g. D.PHP#6809 (#683) - Added
Thread::archive()
andThread::unarchive()
(#682) - Added
ephemeral
argument forInteraction::acknowledgeWithSource()
(#679) - Added many missing attributes:
- Added back
Guild::welcome_screen
attribute, but this will be only filled afterGuild::getWelcomeScreen()
- Added
Message
attributes:interaction
andcomponents
, flag attributes:has_thread
,ephemeral
, andloading
- Added
Webhook
attributes:source_guild
,source_channel
, andurl
- Added
Role
attributetags
- Added
Application
attributesicon
,primary_sku_id
,slug
,summary
,cover_image
, useful to retrieve your bot information without going through Developers Portal page
- Added back
- 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 aMessageReaction
Part (#692) - Changed
Invite::guild_scheduled_event
to return GuildScheduledEvent
Part - Changed end point for the bot self
Member::setNickname()
fromtoEndpoint::GUILD_MEMBER_SELF_NICK
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 wellOption::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 anUser
object and no longer return aMember
object.$message->user
is removed in favour of$message->author
(#663)- Changed
Interaction
promise functions to usereject()
instead of throwing exceptions - Removed leftover first argument
Part
on Guild CommandssetOverwrite()
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
attributesbot_public
,bot_require_code_grant
,terms_of_service_url
,privacy_policy_url
,verify_key
,team
(#672) - Added
Channel
attributepermissions
for interactions, and constants (#672) - Added
Guild
attributeicon_hash
for template (#672) - Added
Message
attributesapplication_id
,components
for interactions (#672) - Added missing
Invite
attributes and constants (#672) - Added missing
Video
attributeproxy_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 nowuse 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 returnChannel|Thread
(check out the conversion guide)Message::stickers
is nowMessage::sticker_items
(#642)- The
User
/Member
/Role
::getAvatarAttribute()
/getBannerAttribute()
/getIconAttribute()
parameter$format
is now default tonull
and will detect the default format & type (i.e. animated) (#657) - Deprecated old permission names: (#661)
use_slash_commands
is nowuse_application_commands
use_public_threads
is nowcreate_public_threads
use_private_threads
is nowcreate_private_threads
manage_emojis
is nowmanage_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 anUser
object and no longer return aMember
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
- Update Pawl version, hot fix for web socket client not connecting
Full Changelog: v6.0.2...v6.0.3
Version 6.0.2
- Added
link
attribute toMessage
- [#526] - Added
filter
function toCollection
. - Fixed voice client error when using PHP 7.4
- Added 'Discord Certified Moderator' flag to
Member
. - Fixed
member
attribute onMessageReaction
returning the wrong type. - Add
sendMessage
toMember
object - [#538] - Fixed command client mention prefix when mentioning nickname.
- Use
Embed
inside command client - [#546] - Add
pending
flag toMember
object - [#550] - Add
updateRolePositions
toGuild
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 toChannel
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
- Fixed
Message::member
attribute returning aUser
- #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
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
andPRESENCE_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 theGUILD_MEMBER
intent to be enabled.
- The
logging
andhttpLogger
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 aNullHandler
.
- All HTTP logging information is now redirected to the
- 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
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
andPRESENCE_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 theGUILD_MEMBER
intent to be enabled.
- The
logging
andhttpLogger
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 aNullHandler
.
- All HTTP logging information is now redirected to the
- 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
Version 5.2.0 Release Candidate 3
- 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.