DiscordPHP Documentation

Deprecated

Table of Contents

src/Discord/Builders/CommandAttributes.php
src/Discord/Builders/Components/Component.php
src/Discord/Builders/Components/SelectMenu.php
src/Discord/Builders/Components/TextInput.php
src/Discord/Builders/MessageBuilder.php
src/Discord/Discord.php
src/Discord/Parts/Channel/Channel.php
src/Discord/Parts/Channel/ChannelTrait.php
src/Discord/Parts/Channel/Message.php
src/Discord/Parts/Embed/Embed.php
src/Discord/Parts/Guild/Guild.php
src/Discord/Parts/Guild/Role.php
src/Discord/Parts/Interactions/Interaction.php
src/Discord/Parts/Interactions/Request/Component.php
src/Discord/Parts/Interactions/Request/InteractionData.php
src/Discord/Parts/Part.php
src/Discord/Parts/Permissions/Permission.php
src/Discord/Parts/User/Activity.php
src/Discord/Parts/User/Member.php
src/Discord/Repository/AbstractRepositoryTrait.php
src/Discord/Voice/VoiceClient.php
src/Discord/WebSockets/Op.php

CommandAttributes.php

Line Element Reason
275 CommandAttributes::setDefaultPermission()

See CommandAttributes::setDefaultMemberPermissions().

Component.php

Line Element Reason
27 Component

Use ComponentObject instead.

51 Component::TYPE_SELECT_MENU

Use Component::TYPE_STRING_SELECT

SelectMenu.php

Line Element Reason
38 SelectMenu

Use StringSelect

TextInput.php

Line Element Reason
62 TextInput::$label

Use a top-level Component::Label

MessageBuilder.php

Line Element Reason
870 MessageBuilder::setV2Flag()

use MessageBuilder::setIsComponentsV2Flag() instead.

927 MessageBuilder::_setFlags()

Use MessageBuilder::setFlags()

Discord.php

Line Element Reason
1797 Discord::getHttp()

Use Discord::getHttpClient()

Channel.php

Line Element Reason
102 Channel::TYPE_TEXT

Use Channel::TYPE_GUILD_TEXT

104 Channel::TYPE_VOICE

Use Channel::TYPE_GUILD_VOICE

106 Channel::TYPE_GROUP

Use Channel::TYPE_GROUP_DM

108 Channel::TYPE_CATEGORY

Use Channel::TYPE_GUILD_CATEGORY

110 Channel::TYPE_NEWS

Use Channel::TYPE_GUILD_ANNOUNCEMENT

112 Channel::TYPE_ANNOUNCEMENT

Use Channel::TYPE_GUILD_ANNOUNCEMENT

114 Channel::TYPE_NEWS_THREAD

Use Channel::TYPE_ANNOUNCEMENT_THREAD

116 Channel::TYPE_STAGE_CHANNEL

Use Channel::TYPE_GUILD_STAGE_VOICE

118 Channel::TYPE_DIRECTORY

Use Channel::TYPE_GUILD_DIRECTORY

120 Channel::TYPE_FORUM

Use Channel::TYPE_GUILD_FORUM

126 Channel::FLAG_PINNED

Use Thread::FLAG_PINNED

ChannelTrait.php

Line Element Reason
163 ChannelTrait::allowText()

Use Channel::isTextBased()

175 ChannelTrait::allowVoice()

Use Channel::isVoiceBased()

187 ChannelTrait::allowInvite()

Use Channel::canInvite()

570 ChannelTrait::sendEmbed()

Use Channel::sendMessage with MessageBuilder::addEmbed()

590 ChannelTrait::sendFile()

Use Channel::sendMessage to send files.

Message.php

Line Element Reason
1107 Message::deleteReaction()

Use Message::deleteAllReactions(), Message::deleteOwnReaction(), Message::deleteUserReaction(), or Message::deleteEmojiReactions().

149 Message::GUILD_MEMBER_JOIN

Use Message::TYPE_USER_JOIN

151 Message::USER_PREMIUM_GUILD_SUBSCRIPTION

Use Message::TYPE_GUILD_BOOST

153 Message::USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_1

Use Message::TYPE_GUILD_BOOST_TIER_1

155 Message::USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_2

Use Message::TYPE_GUILD_BOOST_TIER_2

157 Message::USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_3

Use Message::TYPE_GUILD_BOOST_TIER_3

159 Message::TYPE_NORMAL

Use Message::TYPE_DEFAULT

161 Message::TYPE_USER_ADDED

Use Message::TYPE_RECIPIENT_ADD

163 Message::TYPE_USER_REMOVED

Use Message::TYPE_RECIPIENT_REMOVE

165 Message::CHANNEL_PINNED_MESSAGE

Use Message::TYPE_CHANNEL_PINNED_MESSAGE

167 Message::CHANNEL_FOLLOW_ADD

Use Message::TYPE_CHANNEL_FOLLOW_ADD

169 Message::GUILD_DISCOVERY_DISQUALIFIED

Use Message::TYPE_GUILD_DISCOVERY_DISQUALIFIED

171 Message::GUILD_DISCOVERY_REQUALIFIED

Use Message::TYPE_GUILD_DISCOVERY_REQUALIFIED

173 Message::GUILD_DISCOVERY_GRACE_PERIOD_INITIAL_WARNING

Use Message::TYPE_GUILD_DISCOVERY_GRACE_PERIOD_INITIAL_WARNING

175 Message::GUILD_DISCOVERY_GRACE_PERIOD_FINAL_WARNING

Use Message::TYPE_GUILD_DISCOVERY_GRACE_PERIOD_FINAL_WARNING

177 Message::TYPE_APPLICATION_COMMAND

Use Message::TYPE_CHAT_INPUT_COMMAND

197 Message::FLAG_SUPPRESS_EMBED

Use Message::FLAG_SUPPRESS_EMBEDS instead.

219 Message::FLAG_IS_V2_COMPONENTS

Use Message::FLAG_IS_COMPONENTS_V2 instead.

Embed.php

Line Element Reason
217 Embed::setTypeAttribute()

Type rich will always be used in API.

273 Embed::setType()

Type rich will always be used in API.

Guild.php

Line Element Reason
531 Guild::getStageInstancesAttribute()

Use $channel->stage_instances

827 Guild::validateRegion()

Use Channel::$rtc_region.

Role.php

Line Element Reason
116 Role::setColor()

Use Role::setColors(). Color will still be returned by the API, but using the colors field is recommended when doing requests.

Interaction.php

Line Element Reason
72 Interaction

Use either Ping, ApplicationCommand, MessageComponent, ApplicationCommandAutocomplete, or ModalSubmit

Component.php

Line Element Reason
50 Component

Use \Discord\Parts\Channel\Message\Component` instead.

InteractionData.php

Line Element Reason
43 InteractionData

Use either ApplicationCommandData,MessageComponentData, or ModalSubmitData

Part.php

Line Element Reason
60 Part::$scriptData

Relying on this variable with dynamic caching is discouraged.

Permission.php

Line Element Reason
379 Permission::getManageEmojisAndStickersAttribute()

Use manage_guild_expressions

387 Permission::setManageEmojisAndStickersAttribute()

Use manage_guild_expressions

Activity.php

Line Element Reason
69 Activity::TYPE_PLAYING

Use Activity::TYPE_GAME

Member.php

Line Element Reason
694 Member::getDiscriminatorAttribute()

Use $member->user->discriminator

AbstractRepositoryTrait.php

Line Element Reason
455 AbstractRepositoryTrait::pull()

Use async $repository->cachePull()

491 AbstractRepositoryTrait::pushItem()

Use async $repository->cache->set() This method is deprecated for userland code but can still be used internally within the library.

559 AbstractRepositoryTrait::has()

Use async $repository->cache->has()

632 AbstractRepositoryTrait::clear()

Use async $repository->cache->clear()

687 AbstractRepositoryTrait::offsetExists()

Use async $repository->cache->has() This method is deprecated for userland code but can still be used internally within the library.

702 AbstractRepositoryTrait::offsetGet()

Use async $repository->cacheGet() or sync $repository->get() This method is deprecated for userland code but can still be used internally within the library.

725 AbstractRepositoryTrait::offsetSet()

Use async $repository->cache->set()

737 AbstractRepositoryTrait::offsetUnset()

Use async $repository->cache->delete()

VoiceClient.php

Line Element Reason
1264 VoiceClient::playDCAStream()

DCA is now deprecated in DiscordPHP, switch to using playOggStream with raw Ogg Opus.

Op.php

Line Element Reason
44 Op::OP_PRESENCE_UPDATE

Use OP_UPDATE_PRESENCE

48 Op::OP_VOICE_STATE_UPDATE

Use OP_UPDATE_VOICE_STATE

58 Op::OP_GUILD_MEMBER_CHUNK

Use OP_REQUEST_GUILD_MEMBERS

81 Op::VOICE_SELECT_PROTO

use VOICE_SELECT_PROTOCOL

89 Op::VOICE_DESCRIPTION

use VOICE_SESSION_DESCRIPTION

Search results