DiscordPHP Documentation

Deprecated

Table of Contents

src/Discord/Builders/CommandAttributes.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/Channel/Poll/Poll.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/Parts/User/User.php
src/Discord/Repository/AbstractRepositoryInterface.php
src/Discord/Repository/AbstractRepositoryTrait.php
src/Discord/Repository/VoiceStateRepository.php
src/Discord/Voice/RecieveStream.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
28 Component

Use ComponentObject instead.

73 Component::TYPE_SELECT_MENU

Use Component::TYPE_STRING_SELECT

TextInput.php

Line Element Reason
64 TextInput::$label

Use a top-level Component::Label

MessageBuilder.php

Line Element Reason
884 MessageBuilder::setV2Flag()

use MessageBuilder::setIsComponentsV2Flag() instead.

946 MessageBuilder::_setFlags()

Use MessageBuilder::setFlags()

Discord.php

Line Element Reason
1865 Discord::getHttp()

Use Discord::getHttpClient()

Factory.php

Line Element Reason
56 Factory::create()

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

Channel.php

Line Element Reason
109 Channel::TYPE_TEXT

Use Channel::TYPE_GUILD_TEXT

111 Channel::TYPE_VOICE

Use Channel::TYPE_GUILD_VOICE

113 Channel::TYPE_GROUP

Use Channel::TYPE_GROUP_DM

115 Channel::TYPE_CATEGORY

Use Channel::TYPE_GUILD_CATEGORY

117 Channel::TYPE_NEWS

Use Channel::TYPE_GUILD_ANNOUNCEMENT

119 Channel::TYPE_ANNOUNCEMENT

Use Channel::TYPE_GUILD_ANNOUNCEMENT

121 Channel::TYPE_NEWS_THREAD

Use Channel::TYPE_ANNOUNCEMENT_THREAD

123 Channel::TYPE_STAGE_CHANNEL

Use Channel::TYPE_GUILD_STAGE_VOICE

125 Channel::TYPE_DIRECTORY

Use Channel::TYPE_GUILD_DIRECTORY

127 Channel::TYPE_FORUM

Use Channel::TYPE_GUILD_FORUM

135 Channel::FLAG_PINNED

Use Thread::FLAG_PINNED

153 Channel::FORUM_LAYOUT_GRID_VIEW

Use Channel::FORUM_LAYOUT_GALLERY_VIEW

ChannelTrait.php

Line Element Reason
161 ChannelTrait::allowText()

Use Channel::isTextBased()

173 ChannelTrait::allowVoice()

Use Channel::isVoiceBased()

185 ChannelTrait::allowInvite()

Use Channel::canInvite()

568 ChannelTrait::sendEmbed()

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

588 ChannelTrait::sendFile()

Use Channel::sendMessage to send files.

Message.php

Line Element Reason
714 Message::getMessageSnapshotAttribute()

Use getMessageSnapshotsAttribute().

1082 Message::deleteReaction()

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

156 Message::GUILD_MEMBER_JOIN

Use Message::TYPE_USER_JOIN

158 Message::USER_PREMIUM_GUILD_SUBSCRIPTION

Use Message::TYPE_GUILD_BOOST

160 Message::USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_1

Use Message::TYPE_GUILD_BOOST_TIER_1

162 Message::USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_2

Use Message::TYPE_GUILD_BOOST_TIER_2

164 Message::USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_3

Use Message::TYPE_GUILD_BOOST_TIER_3

166 Message::TYPE_NORMAL

Use Message::TYPE_DEFAULT

168 Message::TYPE_USER_ADDED

Use Message::TYPE_RECIPIENT_ADD

170 Message::TYPE_USER_REMOVED

Use Message::TYPE_RECIPIENT_REMOVE

172 Message::CHANNEL_PINNED_MESSAGE

Use Message::TYPE_CHANNEL_PINNED_MESSAGE

174 Message::CHANNEL_FOLLOW_ADD

Use Message::TYPE_CHANNEL_FOLLOW_ADD

176 Message::GUILD_DISCOVERY_DISQUALIFIED

Use Message::TYPE_GUILD_DISCOVERY_DISQUALIFIED

178 Message::GUILD_DISCOVERY_REQUALIFIED

Use Message::TYPE_GUILD_DISCOVERY_REQUALIFIED

180 Message::GUILD_DISCOVERY_GRACE_PERIOD_INITIAL_WARNING

Use Message::TYPE_GUILD_DISCOVERY_GRACE_PERIOD_INITIAL_WARNING

182 Message::GUILD_DISCOVERY_GRACE_PERIOD_FINAL_WARNING

Use Message::TYPE_GUILD_DISCOVERY_GRACE_PERIOD_FINAL_WARNING

184 Message::TYPE_APPLICATION_COMMAND

Use Message::TYPE_CHAT_INPUT_COMMAND

201 Message::FLAG_SUPPRESS_EMBED

Use Message::FLAG_SUPPRESS_EMBEDS instead.

223 Message::FLAG_IS_V2_COMPONENTS

Use Message::FLAG_IS_COMPONENTS_V2 instead.

Poll.php

Line Element Reason
25 Poll

Use PollCreateRequest.

Embed.php

Line Element Reason
229 Embed::setTypeAttribute()

Type rich will always be used in API.

285 Embed::setType()

Type rich will always be used in API.

Guild.php

Line Element Reason
606 Guild::getStageInstancesAttribute()

Use $channel->stage_instances

629 Guild::getVoiceRegions()

Use Discord::listVoiceRegions instead.

991 Guild::validateRegion()

Use Channel::$rtc_region.

193 Guild::LEVEL_OFF

use GUILD::LEVEL_NONE

201 Guild::LEVEL_TABLEFLIP

use GUILD::LEVEL_HIGH

205 Guild::LEVEL_DOUBLE_TABLEFLIP

use GUILD::LEVEL_VERY_HIGH

Role.php

Line Element Reason
149 Role::setColor()

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

55 Role::IN_PROMPT

use Role::FLAG_IN_PROMPT

Interaction.php

Line Element Reason
71 Interaction

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

Component.php

Line Element Reason
47 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
61 Part::$scriptData

Relying on this variable with dynamic caching is discouraged.

Permission.php

Line Element Reason
383 Permission::getManageEmojisAndStickersAttribute()

Use manage_guild_expressions

391 Permission::setManageEmojisAndStickersAttribute()

Use manage_guild_expressions

Activity.php

Line Element Reason
54 Activity::TYPE_GAME

Use Activity::TYPE_PLAYING

Member.php

Line Element Reason
719 Member::getDiscriminatorAttribute()

Use $member->user->discriminator

User.php

Line Element Reason
67 User::FLAG_DISCORD_EMPLOYEE

use User::FLAG_STAFF

71 User::FLAG_DISCORD_PARTNER

use User::FLAG_PARTNER

75 User::FLAG_HYPESQUAD_EVENTS

use User::FLAG_HYPESQUAD

93 User::FLAG_EARLY_SUPPORTER

use User::FLAG_PREMIUM_EARLY_SUPPORTER

97 User::FLAG_TEAM_USER

use User::FLAG_TEAM_PSEUDO_USER

107 User::FLAG_VERIFIED_BOT_DEVELOPER

use User::FLAG_VERIFIED_DEVELOPER

111 User::FLAG_DISCORD_CERTIFIED_MODERATOR

use User::FLAG_CERTIFIED_MODERATOR

AbstractRepositoryInterface.php

Line Element Reason
27 AbstractRepositoryInterface::save()

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

AbstractRepositoryTrait.php

Line Element Reason
200 AbstractRepositoryTrait::save()

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

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()

VoiceStateRepository.php

Line Element Reason
64 VoiceStateRepository::getVoiceRegions()

Use Discord::listVoiceRegions instead.

RecieveStream.php

Line Element Reason
23 RecieveStream

use ReceiveStream

VoiceClient.php

Line Element Reason
1422 VoiceClient::setBitrate()

This data is now taken from the Channel.

1717 VoiceClient::getRecieveStream()

use self::getReceiveStream()

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