Migrating to v3.0
Updating Voyager from v2 to v3 will bring breaking changes. This is here to help you see what changes to make in your codebase if you wish to upgrade.
Small Changes
- Voyager classes are now no longer parented to a folder, they are now parented to a module script. Requiring this module script gives you access to all Voyager classes without the need to individually require them.
- Removed class
Reaction
. Has no replacement. - Removed class
Emoji
. Has no replacement. - Removed class
ThreadMessage
. Replaced byMessage
class. - Removed class
EditedMessage
. Replaced byMessage
class. - Removed class
EditedThreadMessage
. Replaced byMessage
class. - Removed class
Author
. Replaced byUser
class.
Webhook changes
- Renamed property
id
toId
. - Renamed property
token
toToken
. - Renamed property
baseUrl
toBaseUrl
. - Removed property
ratelimitInfo
. Replaced byRequestStatus.RatelimitInformation
. - Changed method
execute
.- Renamed to
SendMessage
. - No longer returns a third item. Moved to
RequestStatus.RatelimitInformation
.
- Renamed to
- Changed method
editMessage
.- Renamed to
EditMessage
. - No longer returns a third item. Moved to
RequestStatus.RatelimitInformation
.
- Renamed to
- Changed method
deleteMessage
.- Renamed to
DeleteMessage
. - No longer returns a third item. Moved to
RequestStatus.RatelimitInformation
.
- Renamed to
- Renamed method
_validateExecuteRequest
to_ValidateSendMessageRequest
. - Renamed method
_validateEditMessageRequest
to_ValidateEditMessageRequest
. - Renamed method
_request
to_Request
.
RequestStatus changes
- Renamed key
success
toSuccess
- Renamed key
statusCode
toStatusCode
- Renamed key
statusMessage
toStatusMessage
- Removed key
message
. Replaced byRequestStatus.ProxyInformation.Message
. - Removed key
reason
. Replaced byRequestStatus.ProxyInformation.Reason
.
RatelimitInformation changes
- Renamed key
limit
toLimit
. - Renamed key
remaining
toRemaining
. - Renamed key
reset
toReset
. - Renamed key
resetAfter
toResetAfter
. - Renamed key
resetAfterSafe
toResetAfterSafe
. - Renamed key
bucket
toBucket
.
RatelimitedInformation changes
- Renamed key
scope
toScope
. - Renamed key
retryAfter
toRetryAfter
. - Renamed key
retryAfterSafe
toRetryAfterSafe
.
OptionalExecuteInfo changes
- Renamed to
OptionalSendMessageInfo
. - Renamed property
tts
toUseTTS
. - Renamed property
usernameOverride
toUsernameOverride
. - Renamed property
avatarOverride
toAvatarOverride
. - Renamed property
messageFlags
toFlags
. - Renamed property
threadName
toThreadName
.
- Removed property
threadId
. Use the new dedicated methods for threads:SendMessageInThread
,EditMessageInThread
andDeleteMessageInThread
.
- Changed constructor method
new
.- Removed
threadId
parameter. Any method that requires a threadId should now be passed to that method directly. - Property
UseTTS
is now nil by defualt - Property
Flags
is now nil by defualt
- Removed
Embed changes
- Renamed property
title
toTitle
. - Renamed property
description
toDescription
. - Renamed property
url
toUrl
. - Renamed method
setTitle
toSetTitle
- Renamed method
setDescription
toSetDescription
- Renamed method
setUrl
toSetUrl
- Renamed method
setTimestamp
toSetTimestamp
- Renamed method
setColor
toSetColor
- Renamed method
setFooter
toSetFooter
- Renamed method
setImage
toSetImage
- Renamed method
setThumbnail
toSetThumbnail
- Renamed method
setAuthor
toSetAuthor
- Renamed method
addField
toAddField
- Renamed method
totalCharacters
toTotalCharacters
- Renamed method
_validate
to_Validate
- Removed method
colorToRGB
. Replaced byEmbed.Color
- Changed property
timestamp
- Renamed to
Timestamp
- Now returns a
Datetime
instance instead of a string.
- Renamed to
- Changed property
color
- Renamed to
Color
- Now returns a
Color3
instance instead of a number.
- Renamed to
- Changed property
footer
- Renamed to
Footer
- Now returns a
EmbedFooter
instance instead of a raw object.
- Renamed to
- Changed property
image
- Renamed to
Image
- Now returns a
EmbedImage
instance instead of a raw object.
- Renamed to
- Changed property
thumbnail
- Renamed to
Thumbnail
- Now returns a
EmbedThumbnail
instance instead of a raw object.
- Renamed to
- Changed property
author
- Renamed to
Author
- Now returns a
EmbedAuthor
instance instead of a raw object.
- Renamed to
- Changed property
fields
- Renamed to
Fields
- Now returns a table of
EmbedField
instances instead of a table of raw objects.
- Renamed to
Message changes
- Added property
EditedAt
, replacesEditedMessage.editedAt
. - Added property
Position
, replacesThreadMessage.position
. - Renamed property
id
toId
. - Renamed property
messageType
toMessageType
. - Renamed property
content
toContent
. - Renamed property
channelId
toChannelId
. - Renamed property
embeds
toEmbeds
. - Renamed property
mentions
toMentionedUsers
. - Renamed property
mentionRoles
toMentionedRoles
. - Renamed property
pinned
toIsPinned
. - Renamed property
mentionEveryone
toMentionsEveryone
. - Renamed property
tts
toIsTTS
. - Renamed property
createdAt
toCreatedAt
. - Renamed property
flags
toFlags
. - Renamed property
webhookId
toWebhookId
. - Renamed property
jumpUrl
toJumpUrl
. -
Removed property
timestamp
. -
Changed property
author
- Renamed to
Author
. - Now returns a
User
instance.
- Renamed to
Enum changes
- Moved Enum module to the root folder of the project.
- Enum module is now fully typed.
- Renamed enum group
UserPublicFlags
toUserPublicFlag
- Renamed enum
PARTNER
toPartner
- Renamed enum
HYPESQUAD
toHypesquad
- Renamed enum
BUG_HUNTER_LEVEL_1
toBugHunterLevelOne
- Renamed enum
BUG_HUNTER_LEVEL_2
toBugHunterLevelTwo
- Renamed enum
HYPESQUAD_ONLINE_HOUSE_1
toHouseOfBraveryMember
- Renamed enum
HYPESQUAD_ONLINE_HOUSE_2
toHouseOfBrillianceMember
- Renamed enum
HYPESQUAD_ONLINE_HOUSE_3
toHouseOfBalanceMember
- Renamed enum
PREMIUM_EARLY_SUPPORTER
toPremiumEarlySupporter
- Renamed enum
VERIFIED_BOT
toVerifiedBot
- Renamed enum
VERIFIED_DEVELOPER
toVerifiedDeveloper
- Renamed enum
CERTIFIED_MODERATOR
toCertifiedModerator
- Renamed enum
ACTIVE_DEVELOPER
toActiveDeveloper
- Removed enum
TEAM_PSEUDO_USER
. Has no replacement. - Removed enum
BOT_HTTP_INTERACTIONS
. Has no replacement.
- Renamed enum group
MessageFlags
toMessageFlag
- Renamed enum
SUPPRESS_EMBEDS
toSuppressEmbeds
- Renamed enum
SUPPRESS_NOTIFICATIONS
toSuppressNotifications
- Renamed enum group
AvatarImageFormats
toImageFormat
- Renamed enum
JPEG
toJpeg
- Renamed enum
PNG
toPng
- Renamed enum
WEBP
toWebP
- Renamed enum
GIF
toGif
- Renamed enum group
RatelimitScopes
toRatelimitScope
- Renamed enum
USER
toUser
- Renamed enum
SHARED
toShared
- Renamed enum
GLOBAL
toGlobal
User changes
- Renamed property
id
toId
- Renamed property
username
toUsername
- Renamed property
avatar
toAvatarHash
- Renamed property
bot
toIsBot
- Renamed property
mention
toMention
- Renamed property
globalName
toGlobalName
- Renamed property
publicFlags
toPublicFlags
- Renamed method
getAvatarUrl
toGetAvatarUrl
- Renamed method
hasAnimatedAvatar
toHasAnimatedAvatar
DateFormatter changes
- Renamed method
relativeTime
toRelativeTime
- Renamed method
longDate
toLongDate
- Renamed method
shortDate
toShortDate
- Renamed method
longTime
toLongTime
- Renamed method
shortTime
toShortTime
- Renamed method
longDateTime
toLongDateTime
- Renamed method
shortDateTime
toShortDateTime
EmojiFormatter changes
- Renamed method
emoji
toEmoji
- Renamed method
customEmoji
toCustomEmoji
- Renamed method
animatedEmoji
toAnimatedEmoji
MentionFormatter changes
- Renamed method
mentionUser
toMentionUser
- Renamed method
mentionRole
toMentionRole
- Renamed method
mentionChannel
toMentionChannel
MessageFlags changes
- Renamed property
value
toValue
- Renamed method
getFlags
toGetFlags
- Renamed method
hasFlag
toHasFlag
- Renamed method
setFlag
toSetFlag
PublicUserFlags changes
- Renamed property
value
toValue
- Renamed method
getFlags
toGetFlags
- Renamed method
hasFlag
toHasFlag
- Renamed method
setFlag
toSetFlag