Compatibility
Minecraft: Java Edition
1.21.x
1.20.4–1.20.6
1.20–1.20.2
1.19.x
1.18.x
1.17
Platforms
Supported environments
Creators
Details
Licensed MIT
Published 3 years ago
Updated 4 months ago
Changelog
- Updated to 1.21.5
- New behaviour for errors while executing API requests.
Previously, functions would return
trueorfalse(sometimesnullor a value) to indicate success or failure. Now those functions no longer return anything (or only return a value) and instead throw custom discarpet exceptions that can be caught usingtry(). This affects the following functions and queries:- These functions no longer return a boolean value to indicate success
and will instead throw an exception when an error occured:
dc_set_channel_topicdc_reactdc_set_nicknamedc_add_roledc_remove_roledc_set_namedc_delete
- These functions will now throw an exception instead of returning null. When successful they will return a value:
dc_send_messagedc_send_webhookdc_create_webhookdc_update_webhookdc_create_threaddc_create_application_commanddc_get_global_application_commandsdc_user_from_iddc_message_from_iddc_webhook_from_iddc_webhook_from_url
- These actions now properly handle errors and throw exceptions on failure:
attachment~'download'channel~'webhooks'server~'webhooks'server~'slash_commands'user~'private_channel'
- Special cases:
dc_respond_interactioncan still returnnullwhen the response type doesn't create a message. In all other cases it will either throw an exception or return aMessage
- These functions no longer return a boolean value to indicate success
and will instead throw an exception when an error occured:
- Added events:
__on_discord_message(message, old_message, is_actual_edit)__on_discord_message_delete(message)__on_discord_server_member_join(server, user)__on_discord_server_member_leave(server, user)
- Fully removed the deprecated function
dc_create_slash_command. Usedc_create_application_commandinstead - Improved reloading of bots
- Split
dc_timeoutintodc_get_timeoutanddc_set_timeout
Dependencies
Files
Metadata
Release channel
ReleaseVersion number
1.5.6Loaders
Game versions
1.21.5Downloads
400Publication date
March 31, 2025 at 4:09 PMPublisher
replaceitem
Owner



