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/Factory/Factory.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/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/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
275 CommandAttributes::setDefaultPermission()

See CommandAttributes::setDefaultMemberPermissions().

CommandBuilder.php

Line Element Reason
136 CommandBuilder::toArray()

Use jsonSerialize

Component.php

Line Element Reason
29 Component

Use ComponentObject instead.

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
850 MessageBuilder::setV2Flag()

use MessageBuilder::setIsComponentsV2Flag() instead.

912 MessageBuilder::_setFlags()

Use MessageBuilder::setFlags()

Discord.php

Line Element Reason
1906 Discord::getHttp()

Use Discord::getHttpClient()

Factory.php

Line Element Reason
57 Factory::create()

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

Channel.php

Line Element Reason
140 Channel::TYPE_TEXT

Use Channel::TYPE_GUILD_TEXT

142 Channel::TYPE_VOICE

Use Channel::TYPE_GUILD_VOICE

144 Channel::TYPE_GROUP

Use Channel::TYPE_GROUP_DM

146 Channel::TYPE_CATEGORY

Use Channel::TYPE_GUILD_CATEGORY

148 Channel::TYPE_NEWS

Use Channel::TYPE_GUILD_ANNOUNCEMENT

150 Channel::TYPE_ANNOUNCEMENT

Use Channel::TYPE_GUILD_ANNOUNCEMENT

152 Channel::TYPE_NEWS_THREAD

Use Channel::TYPE_ANNOUNCEMENT_THREAD

154 Channel::TYPE_STAGE_CHANNEL

Use Channel::TYPE_GUILD_STAGE_VOICE

156 Channel::TYPE_DIRECTORY

Use Channel::TYPE_GUILD_DIRECTORY

158 Channel::TYPE_FORUM

Use Channel::TYPE_GUILD_FORUM

166 Channel::FLAG_PINNED

Use Thread::FLAG_PINNED

184 Channel::FORUM_LAYOUT_GRID_VIEW

Use Channel::FORUM_LAYOUT_GALLERY_VIEW

ChannelTrait.php

Line Element Reason
165 ChannelTrait::allowText()

Use Channel::isTextBased()

177 ChannelTrait::allowVoice()

Use Channel::isVoiceBased()

189 ChannelTrait::allowInvite()

Use Channel::canInvite()

574 ChannelTrait::sendEmbed()

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

594 ChannelTrait::sendFile()

Use Channel::sendMessage to send files.

Message.php

Line Element Reason
726 Message::getMessageSnapshotAttribute()

Use getMessageSnapshotsAttribute().

1094 Message::deleteReaction()

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

159 Message::GUILD_MEMBER_JOIN

Use Message::TYPE_USER_JOIN

161 Message::USER_PREMIUM_GUILD_SUBSCRIPTION

Use Message::TYPE_GUILD_BOOST

163 Message::USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_1

Use Message::TYPE_GUILD_BOOST_TIER_1

165 Message::USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_2

Use Message::TYPE_GUILD_BOOST_TIER_2

167 Message::USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_3

Use Message::TYPE_GUILD_BOOST_TIER_3

169 Message::TYPE_NORMAL

Use Message::TYPE_DEFAULT

171 Message::TYPE_USER_ADDED

Use Message::TYPE_RECIPIENT_ADD

173 Message::TYPE_USER_REMOVED

Use Message::TYPE_RECIPIENT_REMOVE

175 Message::CHANNEL_PINNED_MESSAGE

Use Message::TYPE_CHANNEL_PINNED_MESSAGE

177 Message::CHANNEL_FOLLOW_ADD

Use Message::TYPE_CHANNEL_FOLLOW_ADD

179 Message::GUILD_DISCOVERY_DISQUALIFIED

Use Message::TYPE_GUILD_DISCOVERY_DISQUALIFIED

181 Message::GUILD_DISCOVERY_REQUALIFIED

Use Message::TYPE_GUILD_DISCOVERY_REQUALIFIED

183 Message::GUILD_DISCOVERY_GRACE_PERIOD_INITIAL_WARNING

Use Message::TYPE_GUILD_DISCOVERY_GRACE_PERIOD_INITIAL_WARNING

185 Message::GUILD_DISCOVERY_GRACE_PERIOD_FINAL_WARNING

Use Message::TYPE_GUILD_DISCOVERY_GRACE_PERIOD_FINAL_WARNING

187 Message::TYPE_APPLICATION_COMMAND

Use Message::TYPE_CHAT_INPUT_COMMAND

204 Message::FLAG_SUPPRESS_EMBED

Use Message::FLAG_SUPPRESS_EMBEDS instead.

226 Message::FLAG_IS_V2_COMPONENTS

Use Message::FLAG_IS_COMPONENTS_V2 instead.

Embed.php

Line Element Reason
234 Embed::setTypeAttribute()

Type rich will always be used in API.

290 Embed::setType()

Type rich will always be used in API.

Guild.php

Line Element Reason
615 Guild::getStageInstancesAttribute()

Use $channel->stage_instances

639 Guild::getVoiceRegions()

Use Discord::listVoiceRegions instead.

1001 Guild::validateRegion()

Use Channel::$rtc_region.

196 Guild::LEVEL_OFF

use GUILD::LEVEL_NONE

204 Guild::LEVEL_TABLEFLIP

use GUILD::LEVEL_HIGH

208 Guild::LEVEL_DOUBLE_TABLEFLIP

use GUILD::LEVEL_VERY_HIGH

Role.php

Line Element Reason
151 Role::setColor()

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

57 Role::IN_PROMPT

use Role::FLAG_IN_PROMPT

Component.php

Line Element Reason
48 Component

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

InteractionData.php

Line Element Reason
42 InteractionData

Use either ApplicationCommandData,MessageComponentData, or ModalSubmitData

Part.php

Line Element Reason
62 Part::$scriptData

Relying on this variable with dynamic caching is discouraged.

Permission.php

Line Element Reason
386 Permission::getManageEmojisAndStickersAttribute()

Use manage_guild_expressions

394 Permission::setManageEmojisAndStickersAttribute()

Use manage_guild_expressions

Activity.php

Line Element Reason
55 Activity::TYPE_GAME

Use Activity::TYPE_PLAYING

Member.php

Line Element Reason
720 Member::getDiscriminatorAttribute()

Use $member->user->discriminator

User.php

Line Element Reason
71 User::FLAG_DISCORD_EMPLOYEE

use User::FLAG_STAFF

75 User::FLAG_DISCORD_PARTNER

use User::FLAG_PARTNER

79 User::FLAG_HYPESQUAD_EVENTS

use User::FLAG_HYPESQUAD

97 User::FLAG_EARLY_SUPPORTER

use User::FLAG_PREMIUM_EARLY_SUPPORTER

101 User::FLAG_TEAM_USER

use User::FLAG_TEAM_PSEUDO_USER

111 User::FLAG_VERIFIED_BOT_DEVELOPER

use User::FLAG_VERIFIED_DEVELOPER

115 User::FLAG_DISCORD_CERTIFIED_MODERATOR

use User::FLAG_CERTIFIED_MODERATOR

AbstractRepositoryInterface.php

Line Element Reason
31 AbstractRepositoryInterface::save()

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

49 AbstractRepositoryInterface::toArray()

Use jsonSerialize

AbstractRepositoryTrait.php

Line Element Reason
181 AbstractRepositoryTrait::save()

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

436 AbstractRepositoryTrait::pull()

Use async $repository->cachePull()

472 AbstractRepositoryTrait::pushItem()

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

540 AbstractRepositoryTrait::has()

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

614 AbstractRepositoryTrait::clear()

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

627 AbstractRepositoryTrait::toArray()

Use jsonSerialize

662 AbstractRepositoryTrait::offsetExists()

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

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

700 AbstractRepositoryTrait::offsetSet()

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

712 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
65 VoiceStateRepository::getVoiceRegions()

Use Discord::listVoiceRegions instead.

OldRecieveStream.php

Line Element Reason
24 OldRecieveStream

use ReceiveStream

OldVoiceClient.php

Line Element Reason
1470 OldVoiceClient::setBitrate()

This data is now taken from the Channel.

1765 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

82 Op::VOICE_SELECT_PROTO

use VOICE_SELECT_PROTOCOL

90 Op::VOICE_DESCRIPTION

use VOICE_SESSION_DESCRIPTION

Search results