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/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/Repository/AbstractRepositoryTrait.php
src/Discord/Repository/VoiceStateRepository.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.

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

use MessageBuilder::setIsComponentsV2Flag() instead.

944 MessageBuilder::_setFlags()

Use MessageBuilder::setFlags()

Discord.php

Line Element Reason
1835 Discord::getHttp()

Use Discord::getHttpClient()

Channel.php

Line Element Reason
101 Channel::TYPE_TEXT

Use Channel::TYPE_GUILD_TEXT

103 Channel::TYPE_VOICE

Use Channel::TYPE_GUILD_VOICE

105 Channel::TYPE_GROUP

Use Channel::TYPE_GROUP_DM

107 Channel::TYPE_CATEGORY

Use Channel::TYPE_GUILD_CATEGORY

109 Channel::TYPE_NEWS

Use Channel::TYPE_GUILD_ANNOUNCEMENT

111 Channel::TYPE_ANNOUNCEMENT

Use Channel::TYPE_GUILD_ANNOUNCEMENT

113 Channel::TYPE_NEWS_THREAD

Use Channel::TYPE_ANNOUNCEMENT_THREAD

115 Channel::TYPE_STAGE_CHANNEL

Use Channel::TYPE_GUILD_STAGE_VOICE

117 Channel::TYPE_DIRECTORY

Use Channel::TYPE_GUILD_DIRECTORY

119 Channel::TYPE_FORUM

Use Channel::TYPE_GUILD_FORUM

125 Channel::FLAG_PINNED

Use Thread::FLAG_PINNED

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
720 Message::getMessageSnapshotAttribute()

Use getMessageSnapshotsAttribute().

1101 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

199 Message::FLAG_SUPPRESS_EMBED

Use Message::FLAG_SUPPRESS_EMBEDS instead.

221 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
222 Embed::setTypeAttribute()

Type rich will always be used in API.

278 Embed::setType()

Type rich will always be used in API.

Guild.php

Line Element Reason
584 Guild::getStageInstancesAttribute()

Use $channel->stage_instances

607 Guild::getVoiceRegions()

Use Discord::listVoiceRegions instead.

969 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
71 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
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
70 Activity::TYPE_PLAYING

Use Activity::TYPE_GAME

Member.php

Line Element Reason
690 Member::getDiscriminatorAttribute()

Use $member->user->discriminator

AbstractRepositoryTrait.php

Line Element Reason
454 AbstractRepositoryTrait::pull()

Use async $repository->cachePull()

490 AbstractRepositoryTrait::pushItem()

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

558 AbstractRepositoryTrait::has()

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

631 AbstractRepositoryTrait::clear()

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

686 AbstractRepositoryTrait::offsetExists()

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

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

724 AbstractRepositoryTrait::offsetSet()

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

736 AbstractRepositoryTrait::offsetUnset()

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

VoiceStateRepository.php

Line Element Reason
64 VoiceStateRepository::getVoiceRegions()

Use Discord::listVoiceRegions instead.

VoiceClient.php

Line Element Reason
1266 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