DiscordPHP Documentation

Deprecated

Table of Contents

src/Discord/Builders/CommandAttributes.php
src/Discord/Builders/CommandBuilder.php
src/Discord/Builders/Components/Component.php
src/Discord/Builders/Components/TextInput.php
src/Discord/Builders/MessageBuilder.php
src/Discord/Discord.php
src/Discord/DiscordCommandClient.php
src/Discord/Factory/Factory.php
src/Discord/Parts/Channel/Channel.php
src/Discord/Parts/Channel/ChannelTrait.php
src/Discord/Parts/Channel/Message/Embed/Embed.php
src/Discord/Parts/Channel/Message/Message.php
src/Discord/Parts/Guild/AuditLog/Entry.php
src/Discord/Parts/Guild/Guild.php
src/Discord/Parts/Guild/Member/Member.php
src/Discord/Parts/Guild/Role/Role.php
src/Discord/Parts/Interactions/Request/Component.php
src/Discord/Parts/Part.php
src/Discord/Parts/Permissions/Permission.php
src/Discord/Parts/User/Activity.php
src/Discord/Parts/User/User.php
src/Discord/Repository/AbstractRepositoryInterface.php
src/Discord/Repository/AbstractRepositoryTrait.php
src/Discord/Repository/Guild/ChannelRepository.php
src/Discord/Repository/VoiceStateRepository.php
src/Discord/Voice/OldRecieveStream.php
src/Discord/Voice/OldVoiceClient.php
src/Discord/Voice/VoicePacket.php
src/Discord/WebSockets/Op.php

CommandAttributes.php

Line Element Reason
277 CommandAttributes::setDefaultPermission()

See CommandAttributes::setDefaultMemberPermissions().

CommandBuilder.php

Line Element Reason
136 CommandBuilder::toArray()

Use jsonSerialize

Component.php

Line Element Reason
74 Component::TYPE_SELECT_MENU

Use ComponentObject::TYPE_STRING_SELECT

TextInput.php

Line Element Reason
161 TextInput::setLabel()

Use a top-level ComponentObject::Label

65 TextInput::$label

Use a top-level ComponentObject::Label

MessageBuilder.php

Line Element Reason
855 MessageBuilder::_setFlags()

Use MessageBuilder::setFlags()

937 MessageBuilder::setV2Flag()

use MessageBuilder::setIsComponentsV2Flag() instead.

Discord.php

Line Element Reason
2328 Discord::getHttp()

Use Discord::getHttpClient()

DiscordCommandClient.php

Line Element Reason
28 DiscordCommandClient

Use 'MessageCommandClient'

Factory.php

Line Element Reason
57 Factory::create()

Use Factory::part() or Factory::repository()

Channel.php

Line Element Reason
149 Channel::TYPE_TEXT

Use Channel::TYPE_GUILD_TEXT

151 Channel::TYPE_VOICE

Use Channel::TYPE_GUILD_VOICE

153 Channel::TYPE_GROUP

Use Channel::TYPE_GROUP_DM

155 Channel::TYPE_CATEGORY

Use Channel::TYPE_GUILD_CATEGORY

157 Channel::TYPE_NEWS

Use Channel::TYPE_GUILD_ANNOUNCEMENT

159 Channel::TYPE_ANNOUNCEMENT

Use Channel::TYPE_GUILD_ANNOUNCEMENT

161 Channel::TYPE_NEWS_THREAD

Use Channel::TYPE_ANNOUNCEMENT_THREAD

163 Channel::TYPE_STAGE_CHANNEL

Use Channel::TYPE_GUILD_STAGE_VOICE

165 Channel::TYPE_DIRECTORY

Use Channel::TYPE_GUILD_DIRECTORY

167 Channel::TYPE_FORUM

Use Channel::TYPE_GUILD_FORUM

175 Channel::FLAG_PINNED

Use Thread::FLAG_PINNED

179 Channel::HIDE_MEDIA_DOWNLOAD_OPTIONS

Use Channel::FLAG_HIDE_MEDIA_DOWNLOAD_OPTIONS

197 Channel::FORUM_LAYOUT_GRID_VIEW

Use Channel::FORUM_LAYOUT_GALLERY_VIEW

ChannelTrait.php

Line Element Reason
168 ChannelTrait::allowText()

Use Channel::isTextBased()

180 ChannelTrait::allowVoice()

Use Channel::isVoiceBased()

192 ChannelTrait::allowInvite()

Use Channel::canInvite()

572 ChannelTrait::sendEmbed()

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

592 ChannelTrait::sendFile()

Use Channel::sendMessage to send files.

Embed.php

Line Element Reason
237 Embed::setTypeAttribute()

Type rich will always be used in API.

293 Embed::setType()

Type rich will always be used in API.

Message.php

Line Element Reason
737 Message::getMessageSnapshotAttribute()

Use getMessageSnapshotsAttribute().

1115 Message::deleteReaction()

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

166 Message::GUILD_MEMBER_JOIN

Use Message::TYPE_USER_JOIN

168 Message::USER_PREMIUM_GUILD_SUBSCRIPTION

Use Message::TYPE_GUILD_BOOST

170 Message::USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_1

Use Message::TYPE_GUILD_BOOST_TIER_1

172 Message::USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_2

Use Message::TYPE_GUILD_BOOST_TIER_2

174 Message::USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_3

Use Message::TYPE_GUILD_BOOST_TIER_3

176 Message::TYPE_NORMAL

Use Message::TYPE_DEFAULT

178 Message::TYPE_USER_ADDED

Use Message::TYPE_RECIPIENT_ADD

180 Message::TYPE_USER_REMOVED

Use Message::TYPE_RECIPIENT_REMOVE

182 Message::CHANNEL_PINNED_MESSAGE

Use Message::TYPE_CHANNEL_PINNED_MESSAGE

184 Message::CHANNEL_FOLLOW_ADD

Use Message::TYPE_CHANNEL_FOLLOW_ADD

186 Message::GUILD_DISCOVERY_DISQUALIFIED

Use Message::TYPE_GUILD_DISCOVERY_DISQUALIFIED

188 Message::GUILD_DISCOVERY_REQUALIFIED

Use Message::TYPE_GUILD_DISCOVERY_REQUALIFIED

190 Message::GUILD_DISCOVERY_GRACE_PERIOD_INITIAL_WARNING

Use Message::TYPE_GUILD_DISCOVERY_GRACE_PERIOD_INITIAL_WARNING

192 Message::GUILD_DISCOVERY_GRACE_PERIOD_FINAL_WARNING

Use Message::TYPE_GUILD_DISCOVERY_GRACE_PERIOD_FINAL_WARNING

194 Message::TYPE_APPLICATION_COMMAND

Use Message::TYPE_CHAT_INPUT_COMMAND

211 Message::FLAG_SUPPRESS_EMBED

Use Message::FLAG_SUPPRESS_EMBEDS instead.

233 Message::FLAG_IS_V2_COMPONENTS

Use Message::FLAG_IS_COMPONENTS_V2 instead.

Entry.php

Line Element Reason
175 Entry::VOICE_CHANNEL_STATUS_UPDATE

use VOICE_CHANNEL_STATUS_CREATE

Guild.php

Line Element Reason
708 Guild::getStageInstancesAttribute()

Use $channel->stage_instances

1142 Guild::validateRegion()

Use Channel::$rtc_region.

211 Guild::LEVEL_OFF

use GUILD::LEVEL_NONE

219 Guild::LEVEL_TABLEFLIP

use GUILD::LEVEL_HIGH

223 Guild::LEVEL_DOUBLE_TABLEFLIP

use GUILD::LEVEL_VERY_HIGH

Member.php

Line Element Reason
731 Member::getDiscriminatorAttribute()

Use $member->user->discriminator

Role.php

Line Element Reason
152 Role::setColor()

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

58 Role::IN_PROMPT

use Role::FLAG_IN_PROMPT

Component.php

Line Element Reason
50 Component

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

Part.php

Line Element Reason
62 Part::$scriptData

Relying on this variable with dynamic caching is discouraged.

Permission.php

Line Element Reason
389 Permission::getManageEmojisAndStickersAttribute()

Use manage_guild_expressions

397 Permission::setManageEmojisAndStickersAttribute()

Use manage_guild_expressions

Activity.php

Line Element Reason
63 Activity::TYPE_GAME

Use Activity::TYPE_PLAYING

User.php

Line Element Reason
72 User::FLAG_DISCORD_EMPLOYEE

use User::FLAG_STAFF

76 User::FLAG_DISCORD_PARTNER

use User::FLAG_PARTNER

80 User::FLAG_HYPESQUAD_EVENTS

use User::FLAG_HYPESQUAD

98 User::FLAG_EARLY_SUPPORTER

use User::FLAG_PREMIUM_EARLY_SUPPORTER

102 User::FLAG_TEAM_USER

use User::FLAG_TEAM_PSEUDO_USER

112 User::FLAG_VERIFIED_BOT_DEVELOPER

use User::FLAG_VERIFIED_DEVELOPER

116 User::FLAG_DISCORD_CERTIFIED_MODERATOR

use User::FLAG_CERTIFIED_MODERATOR

AbstractRepositoryInterface.php

Line Element Reason
68 AbstractRepositoryInterface::save()

Use Part->save($reason) to ensure permissions are checked.

155 AbstractRepositoryInterface::toArray()

Use jsonSerialize

AbstractRepositoryTrait.php

Line Element Reason
194 AbstractRepositoryTrait::save()

Use Part->save($reason) to ensure permissions are checked.

449 AbstractRepositoryTrait::pull()

Use async $repository->cachePull()

485 AbstractRepositoryTrait::pushItem()

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

561 AbstractRepositoryTrait::has()

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

635 AbstractRepositoryTrait::clear()

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

648 AbstractRepositoryTrait::toArray()

Use jsonSerialize

683 AbstractRepositoryTrait::offsetExists()

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

698 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.

721 AbstractRepositoryTrait::offsetSet()

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

733 AbstractRepositoryTrait::offsetUnset()

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

ChannelRepository.php

Line Element Reason
70 ChannelRepository::createChannel()

use ChannelBuilder::create($repository)

89 ChannelRepository::build()

Use ChannelBuilder::create($repository)

VoiceStateRepository.php

Line Element Reason
73 VoiceStateRepository::getVoiceRegions()

Use Discord::listVoiceRegions instead.

OldRecieveStream.php

Line Element Reason
24 OldRecieveStream

use ReceiveStream

OldVoiceClient.php

Line Element Reason
1526 OldVoiceClient::setBitrate()

This data is now taken from the Channel.

1821 OldVoiceClient::getRecieveStream()

use self::getReceiveStream()

VoicePacket.php

Line Element Reason
176 VoicePacket::initBufferEncryption()

Use VoiceGroupCrypto::encryptRTPPacket()

Op.php

Line Element Reason
45 Op::OP_PRESENCE_UPDATE

Use OP_UPDATE_PRESENCE

49 Op::OP_VOICE_STATE_UPDATE

Use OP_UPDATE_VOICE_STATE

59 Op::OP_GUILD_MEMBER_CHUNK

Use OP_REQUEST_GUILD_MEMBERS

84 Op::VOICE_SELECT_PROTO

use VOICE_SELECT_PROTOCOL

92 Op::VOICE_DESCRIPTION

use VOICE_SESSION_DESCRIPTION

Search results