Tags
Creators
Details
Licensed MIT
Published 4 years ago
All versions
1.5.6
Release
1.5.6last year 434
Uploaded by
Compatibility
Minecraft: Java Edition
1.21.5
Platform
Fabric
Supported environments
Server-side
Singleplayer
Required content
Any compatible version
Changes
- 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
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:m00L1GVJ:l6HJvCQk"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:m00L1GVJ:l6HJvCQk"
}

