Skip to content

Releases: discord-php/DiscordPHP

Version 7.0.9

01 Apr 09:50
Compare
Choose a tag to compare

Fix for retrieveBans after breaking change with API discord/discord-api-docs@808d94b

Also fixed the retrieveBans not properly given discriminator and guild data

Full Changelog: v7.0.8...v7.0.9

Version 7.0.8

31 Mar 03:41
b2843ea
Compare
Choose a tag to compare

Hotfix #776 for direct message crash to the previous fix #775

Full Changelog: v7.0.7...v7.0.8

Version 7.0.6

30 Mar 15:08
0fcd6ca
Compare
Choose a tag to compare

What's Changed

Full Changelog: v7.0.5...v7.0.6

Version 7.0.5

11 Mar 11:35
0d75af9
Compare
Choose a tag to compare

What's Changed

  • VoiceClient::isSpeaking() without $id returns the current bot speaking status by @key2peace in #754
  • Fix PresenceUpdate::guild nullable by @SQKo in #758
  • VoiceClient updates and fix by @key2peace in #752
  • Fix getPermissions() on Threads to inherit permissions from the channel in which they were created by @valzargaming in #759
  • SelectMenu::placeholder limit 150 chars, guild_scheduled_event id for stage instance, Permission::start_embedded_activities is soon to be renamed as Permission::use_embedded_activities by @SQKo in #760

Full Changelog: v7.0.4...v7.0.5

Version 7.0.4

03 Mar 06:56
97d6ebb
Compare
Choose a tag to compare

What's Changed

  • Fixed Option::addChoice() null pointer exception. by @shehi in #739
  • Changed custom_id argument as optional for new Button(). by @shehi in #740
  • Added MessageBuilder for Message::reply() and Message::delayedReply() functions by @SQKo in #741
  • Fixed Channel::setOverwrite() fatal error to ignore permission check if guild does not exist or channel not yet created by @SQKo in #743
  • Added Channel::getBotPermissions() helper function by @key2peace in #744
  • Changed Interaction::sendFollowUpMessage() to be usable for InteractionType::MESSAGE_COMPONENT by @SQKo in #748
  • Fixed sub command options (credits Discord user idkmanm#3642) in #749

Full Changelog: v7.0.3...v7.0.4

Version 7.0.3

24 Feb 12:24
397c522
Compare
Choose a tag to compare

What's Changed

  • Fix embed description limit, remove duplicated happy eyeballs option by @SQKo in #732
  • Add Member::setRoles() and Fix to ignore potential null guild on events by @SQKo in #734
  • Tweak deleteMessages(), add Collection::last() @key2peace in #736

Full Changelog: v7.0.2...v7.0.3

Version 7.0.2

16 Feb 17:03
9248705
Compare
Choose a tag to compare

What's Changed

  • Bumped version
  • Deprecated Invite::stage_instance
  • Fixed phpdoc regarding $channel parameter in Member::moveMember() can be nullable
  • Added Thread::getUpdateableAttributes(), the following functions are separate to be used by Bot without MANAGE_THREAD permissions but owns the thread:
    • Added Thread::rename()
    • Added Thread::setAutoArchiveDuration()
    • Added audit log $reason parameters for Thread::archive() and Thread::unarchive()
  • Thread attributes archived, locked, auto_archive_duration can be now set shorter without accessing thread_metadata, e.g. $thread->archived = true;
  • Added MessageBuilder::addAttachment(), MessageBuilder::getAttachments(), MessageBuilder::clearAttachments()
  • Updated Discord::close(false) to send OP Code 1000 (normal close), if you want to close your bot gracefully (as if you do not want to restart soon) and make it offline from discord, you can use the following code:
$discord->close(false);
$loop = $discord->getLoop();
$loop->futureTick([$loop, 'stop']);

Full Changelog: v7.0.1...v7.0.2

Version 7.0.1

14 Feb 05:32
02b35ac
Compare
Choose a tag to compare
  • Fixed TextInput::setRequired() default value false to true
  • Added dnsConfig Discord options, make VoiceClient to use system configuration DNS resolver first before Google Public DNS

Full Changelog: v7.0.0...v7.0.1

Version 7.0.0

12 Feb 17:11
2b8b2ed
Compare
Choose a tag to compare

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

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: