Releases: tonkku107/slashook
Releases · tonkku107/slashook
v0.4.0
- Added support for auto-populated Select Menus
- Added
default_values
andadd_default_value(id, value_type)
toSelectMenu
- Added
DefaultValue
andDefaultValueType
- Added
resolved
toMessage
- Added
- Added support for monetization
- Added
entitlements
toCommandInput
- Added
premium_required()
toCommandResponder
- Added
SKU
,SKUType
,SKUFlags
,Entitlement
,EntitlementType
,ListEntitlementsOptions
,TestEntitlementOptions
andEntitlementOwnerType
structs/enums - Added rest API functions to
SKU
list_skus(rest, application_id)
- Added rest API functions to
Entitlement
list_entitlements(rest, application_id, options)
create_test_entitlement(rest, application_id, options)
delete_test_entitlement(rest, application_id)
consume_entitlement(rest, application_id)
- Added
- Added support for voice messages (thanks @flazepe!)
- Added
set_as_voice_message()
toMessageResponse
- Added
duration_secs
andwaveform
toAttachment
- Added
duration_secs
,waveform
,set_duration(duration_secs)
andset_waveform(waveform)
toFile
- Added
IS_VOICE_MESSAGE
toMessageFlags
- Added
- Added support for user-installable apps
- Added
authorizing_integration_owners
andcontext
toCommandInput
- Added
integration_types
andcontexts
toCommand
- Removed
dm_permissions
fromCommand
in favor ofcontexts
- Added
IntegrationType
,IntegrationOwners
andInteractionContextType
structs/enums
- Added
- Added rest API functions related to pins
- Added functions to
Channel
get_pinned_messages(rest)
pin_message(rest, message_id)
unpin_message(rest, message_id)
- Added functions to
Message
pin(rest)
unpin(rest)
- Added functions to
- Added support for polls
- Added
poll
andset_poll(poll)
toMessageResponse
- Added
Poll
,PollMedia
,PollAnswer
,PollLayoutType
,PollResults
,PollAnswerCount
,PollCreateRequest
andPollVoters
structs/enums
- Added
- Added rest API functions related to threads
- Added
ThreadCreateOptions
,ThreadMemberOptions
,ThreadListOptions
andThreadListResponse
structs - Added functions to
Channel
start_thread(rest, options)
join_thread(rest)
add_thread_member(rest, user_id)
leave_thread(rest)
remove_thread_member(rest, user_id)
get_thread_member(rest, user_id, options)
list_thread_members(rest, options)
list_public_archived_threads(rest, options)
list_private_archived_threads(rest, options)
list_joined_private_archived_threads(rest, options)
- Added functions to
Message
start_thread(rest, options)
- Added
- Fixed
SelectOption::set_default
's argument and return types not being consistent with the rest of the functions - Added
channel
andapplication_id
toCommandInput
- Changed
app_permissions
inCommandInput
fromOption<Permissions>
toPermissions
- Renamed enum variants in
AllowedMentionType
to upper-case - Updated Discord structs
Permissions
MANAGE_EMOJIS_AND_STICKERS
renamed toMANAGE_GUILD_EXPERSSIONS
START_EMBEDDED_ACTIVITIES
renamed toUSE_EMBEDDED_ACTIVITIES
- Added
VIEW_CREATOR_MONETIZATION_ANALYTICS
,USE_SOUNDBOARD
,USE_EXTERNAL_SOUNDS
,SEND_VOICE_MESSAGES
,CREATE_GUILD_EXPRESSIONS
andCREATE_EVENTS
- Added
message
toChannel
- Added
flags
toAttachment
- Added
AttachmentFlags
bitflags
- Added
Application
- Added
bot
,guild
,approximate_guild_count
,redirect_uris
,interactions_endpoint_url
,tags
,integration_types
,integration_types_config
- Changed
bot_public
toOption<bool>
- Changed
bot_require_code_grant
toOption<bool>
- Changed
verify_key
toOption<String>
- Added
ApplicationIntegrationTypesConfig
andApplicationIntegrationTypesConfigValue
structs
- Added
Message
- Added
interaction_metadata
- Added
MessageInteractionMetadata
struct
- Added
- Removed
interaction
- Removed
MessageInteraction
struct
- Removed
- Added
- Added
APPLICATION_AUTO_MODERATION_RULE_CREATE_BADGE
toApplicationFlags
- Internal changes
- bitflags, syn and devise updated to new major versions
- Changed
Into<ComponentType> for SelectMenuType
toFrom<SelectMenuType> for ComponentType
- Changed
description
inCommand
to a wrapper type that allows the string to be optional via macro - Moved message related structs to their own file
v0.3.0
- Added a command sync functionality
- The
command
macro now has a new format that lets you specify the command's options and more - Added
client_id
andclient_secret
toConfig
- Added
sync_commands()
andsync_guild_commands(guild_id)
toClient
- Renamed
sub_command
tosubcommand
andsub_command_group
tosubcommand_group
inCommandInput
- Added
TryFrom<u8>
traits toChannelType
,ApplicationCommandType
andInteractionOptionType
- Added
From<u64>
trait toPermissions
- Added
name_localizations
toApplicationCommandOptionChoice
- Added
with_client_credentials(client_id, client_secret, scopes)
to the rest handler - Added
ApplicationCommand
andApplicationCommandOption
structsApplicationCommand
hasbulk_overwrite_global_commands(rest, application_id, commands)
andbulk_overwrite_guild_commands(rest, application_id, guild_id, commands)
rest api functions
- Made
InteractionOptionType
visible in documentation
- The
- Added support for new select menu types
- Added
resolved_values
,is_string_select()
,is_user_select()
,is_role_select()
,is_mentionable_select()
andis_channel_select()
toCommandInput
- Removed
is_select_menu()
fromCommandInput
- Added
USER_SELECT
,ROLE_SELECT
,MENTIONABLE_SELECT
andCHANNEL_SELECT
toComponentType
- Renamed
SELECT_MENU
toSTRING_SELECT
inComponentType
options
inSelectMenu
is now anOption<Vec<SelectOption>>
- Added
channel_types
,get_type()
andadd_channel_type(channel_type)
toSelectMenu
- Added
SelectMenuType
- Added
- Added rest API functions related to reactions
- Added
ReactionFetchOptions
struct - Added functions to
Message
create_reaction(rest, emoji)
delete_reaction(rest, emoji)
delete_user_reaction(rest, emoji, user_id)
get_reactions(rest, emoji, options)
delete_all_reactions(rest)
delete_all_reactions_for_emoji(rest, emoji)
- Added
- Added rest API functions related to channels
- Added
ChannelModifyOptions
,FollowedChannel
andCreateInviteOptions
structs - Added functions to
Channel
fetch(rest, channel_id)
modify(rest, options)
delete(rest)
fetch_messages(rest, options)
fetch_message(rest, message_id)
create_message(rest, message)
bulk_delete_messages(rest, messages)
edit_channel_permission(rest, overwrite)
delete_channel_permission(rest, overwrite_id)
get_invites(rest)
create_invite(rest, options)
follow(rest, target_channel_id)
trigger_typing(rest)
- Added
- The
send_message
,update_message
,defer
,defer_update
,autocomplete
andopen_modal
functions inCommandResponder
are now asyncsend_message
andupdate_message
will now callsend_followup_message
andedit_original_message
respectively if the interaction has already been responded to- The rest will return an
InteractionResponseError
if the interaction has already been responded to
- Added
clear_embeds
andclear_attachments
toMessageResponse
- Added an example to the documentation for
keep_attachment
- Added an example to the documentation for
- Added
app_permissions
toCommandInput
joined_at
andpremium_since
inGuildMember
now useDateTime
color
inRole
now uses theColor
util type- Added more
From
traits toMessageResponse
From<File>
From<Vec<File>>
From<Vec<Embed>>
Components
is now a tuple struct- Added user-agent headers to requests and responses
- Added
put(path, data)
to the rest handler - Message content will no longer be serialized (to null) if
None
- Updated Discord object structs
- Renamed
PermissionOverwrites
struct toPermissionOverwrite
- Added
managed
,flags
,total_message_sent
,available_tags
,default_reaction_emoji
,default_thread_rate_limit_per_user
,default_sort_order
anddefault_forum_layout
toChannel
- Added
ChannelFlags
bitflags - Added
ForumTag
andDefaultReaction
structs - Added
SortOrderType
andForumLayoutType
enums
- Added
ChannelType
:GUILD_NEWS
->GUILD_ANNOUNCEMENT
- Removed
GUILD_STORE
GUILD_NEWS_THREAD
->ANNOUNCEMENT_THREAD
- Added
GUILD_DIRECTORY
andGUILD_FORUM
- Added
member
toThreadMetadata
- Added
Sticker
andStickerType
structs- Moved
StickerItem
andStickerFormatType
fromchannels
tostickers
- Moved
- Added
position
androle_subscription_data
toMessage
- Added
RoleSubscriptionData
struct
- Added
MessageType
:GUILD_MEMBER_JOIN
->USER_JOIN
USER_PREMIUM_GUILD_SUBSCRIPTION
->GUILD_BOOST
USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_1
->GUILD_BOOST_TIER_1
USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_2
->GUILD_BOOST_TIER_2
USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_3
->GUILD_BOOST_TIER_3
- Added
AUTO_MODERATION_ACTION
,ROLE_SUBSCRIPTION_PURCHASE
,INTERACTION_PREMIUM_UPSELL
,STAGE_START
,STAGE_END
,STAGE_SPEAKER
,STAGE_TOPIC
andGUILD_APPLICATION_PREMIUM_SUBSCRIPTION
- Added
FAILED_TO_MENTION_SOME_ROLES_IN_THREAD
andSUPPRESS_NOTIFICATIONS
toMessageFlags
- Added
Guild
struct- Added
VerificationLevel
,MessageNotificationsLevel
,ExplicitContentFilterLevel
,MFALevel
,PremiumTier
,NSFWLevel
,PrivacyLevel
,EventStatus
,EntityType
enums - Added
WelcomeScreen
,WelcomeScreenChannel
,GuildScheduledEvent
,EntityMetadata
structs - Added
SystemChannelFlags
bitfield
- Added
- Added
Invite
struct- Added
TargetType
enum
- Added
- Added
install_params
,custom_install_url
androle_connections_verification_url
toApplication
- Added
InstallParams
struct
- Added
- Added
APPLICATION_COMMAND_BADGE
toApplicationFlags
- Added
flags
toGuildMember
- Added
GuildMemberFlags
bitflags
- Added
- Added
subscription_listing_id
,available_for_purchase
andguild_connections
toRoleTags
- Added
ACTIVE_DEVELOPER
toUserFlags
- Added
NITRO_BASIC
toPremiumType
- Updated documentation
- Renamed
- Internal changes
- Rest client is reused instead of recreated with each request
- Moved defer message flag processing
- Removed a workaround for multipart handling
- Improved error handling
- Rest handler can now return
()
from generics - Added
to_url_format()
toEmoji
- Replaced
format_response
inCommandHandler
with aFrom
trait - split macro converter functionality to a separate file
- split command handler functionality to a separate file
v0.2.1
v0.2.0
- Switched to API v10
- Switched to 2021 edition of rust
Message.flags
is now anOption<MessageFlags>
Application.flags
is now anOption<ApplicationFlags>
SelectMenu.custom_id
is now aString
MessageResponse.ephemeral
has been replaced withflags
set_suppress_embeds(suppress)
was also added
- Followup methods in
CommandResponder
now haveRestError
as error type - Added support for autocomplete interactions
- Added
values
andfocused
toCommandInput
- Added
autocomplete(results)
toCommandResponder
- Added
- Added support for attachment option type and improved attachment support
- Added
attachments
andkeep_attachment(attachment_id)
toMessageResponse
- Added
attachments
toInteractionDataResolved
- Added
Attachment
,is_attachment()
andas_attachment()
toOptionValue
- Added
description
andset_description(description)
toFile
- Added support for sending files within the initial interaction response
- Added
- Added support for modal interactions and text input components
- Added
MODAL_SUBMIT
toInteractionTypes
- Added
Modal
struct incommands
module - Added
open_modal(modal)
toCommandResponder
- Added
TEXT_INPUT
toComponentType
- Added
TextInput
andadd_text_input(text_input)
toComponent
- Added
- Added
interaction_type
,command_type
,component_type
,locale
andguild_locale
toCommandInput
- Added interaction type checking methods to
CommandInput
is_command()
is_chat_input()
is_user_context()
is_message_context()
is_component()
is_button()
is_select_menu()
is_autocomplete()
is_modal_submit()
- Updated Discord object structs
- Added
ephemeral
anddescription
toAttachment
- Added
create_timestamp
toThreadMetadata
- Renamed
APPLICATION_COMMAND
toCHAT_INPUT_COMMAND
and addedCONTEXT_MENU_COMMAND
inMessageType
- Added
member
toMessageActivity
- Added
avatar
andcommunication_disabled_until
toGuildMember
- Added
icon
andunicode_emoji
toRole
Permissions
:- Added
MANAGE_EVENTS
,SEND_MESSAGES_IN_THREADS
,START_EMBEDDED_ACTIVITIES
andMODERATE_MEMBERS
- Renamed
USE_PUBLIC_THREADS
andUSE_PRIVATE_THREADS
toCREATE_PUBLIC_THREADS
andCREATE_PRIVATE_THREADS
respectively
- Added
UserFlags
:DISCORD_EMPLOYEE
->STAFF
PARTNERED_SERVER_OWNER
->PARTNER
HYPESQUAD_EVENTS
->HYPESQUAD
HOUSE_BRAVERY
->HYPESQUAD_ONLINE_HOUSE_1
HOUSE_BRILLIANCE
->HYPESQUAD_ONLINE_HOUSE_2
HOUSE_BALANCE
->HYPESQUAD_ONLINE_HOUSE_3
EARLY_SUPPORTER
->PREMIUM_EARLY_SUPPORTER
TEAM_USER
->TEAM_PSEUDO_USER
EARLY_VERIFIED_BOT_DEVELOPER
->VERIFIED_DEVELOPER
- Added
CERTIFIED_MODERATOR
andBOT_HTTP_INTERACTIONS
- Added
- Started work on adding REST API methods to structs
- Added
rest
toCommandInput
- Added
bot_token
toConfig
- Added
fetch(rest, channel_id, message_id)
,fetch_many(rest, channel_id, options)
,create(rest, channel_id, message)
,edit(rest, message)
,delete(rest)
andcrosspost(rest)
toMessage
- Added
- Fixed some
*_type
fields not being renamed when (de)serializing - Added skipping serialization on
embeds
,components
,attachments
andallowed_mentions
ifNone
inMessageResponse
- Added documentation wherever it was missing