All Mods Resource Packs Data Packs Shaders Modpacks Plugins
Carpet Discarpet

Carpet Discarpet

by replaceitem • Downloads: 0 • Followers: 0
Description
Gallery
Changelog
Versions

Discarpet

Available for fabric Available on Modrinth See me on GitHub Read the Documentation

A Carpet extension for discord bot functionality

Discarpet

This is an extension for fabric-carpet that adds parts of the Discord bot API as scarpet functions.

This allows you to code Discord bots that run within Minecraft, and interact with the Minecraft world.

Requires Carpet mod

How to Install Carpet Discarpet (Mod)

Carpet Discarpet by replaceitem is verified for Fabric across Minecraft versions 1.17, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3 (latest release: 1.7.7, file size: 8.5 MB). Follow the steps below to install it safely from ModCraft.tv:

  1. Click the Download button above and select your Minecraft version (1.17, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3) and platform (Fabric).
  2. Make sure you have the compatible loader or environment installed for Fabric.
  3. Move the downloaded Carpet Discarpet file into your Minecraft .minecraft/mods folder and launch the game.

All Versions

+ Add Version
Name Game version Platforms Published Downloads Actions
26.3 26.2
Fabric
1mo ago 1
26.3 26.2
Fabric
4mo ago 1
26.1.x
Fabric
5mo ago 1
26.1.x
Fabric
7mo ago 1
1.21.11
Fabric
7mo ago 1
1.21.11
Fabric
9mo ago 1
1.21.11
Fabric
11mo ago 1
1.21.x
Fabric
11mo ago 1
1.21.x
Fabric
last yr. 1
1.21.x
Fabric
last yr. 1
1.21.5
Fabric
last yr. 1
1.21.x
Fabric
last yr. 1
1.21.x 1.20.x
Fabric
last yr. 1
1.20.4
Fabric
last yr. 1
1.20.2
Fabric
last yr. 1
1.20.2
Fabric
last yr. 1
1.20.x
Fabric
last yr. 1
1.20.x
Fabric
last yr. 1
1.19.4
Fabric
last yr. 1
1.19.3
Fabric
last yr. 1
1.19.x
Fabric
last yr. 1
1.19.x
Fabric
last yr. 1
1.19.1
Fabric
last yr. 1
1.19
Fabric
last yr. 1
1.19
Fabric
last yr. 1
1.19
Fabric
last yr. 1
1.19
Fabric
last yr. 1
1.19
Fabric
last yr. 1
1.18.x 1.17
Fabric
last yr. 1
[1.7.7] 1.7.7 by replaceitem on Sep 17, 2026
Download
  • Added image_description and thumbnail_description to the embed schema
  • Added file_types option for attachment slash command option and file upload component
[1.7.6] 1.7.6 by replaceitem on Jun 17, 2026
Download
  • Updated to MC 26.2
[1.7.5] 1.7.5 by replaceitem on Jun 03, 2026
Download
  • Reworked bot connection. Behavior may vary.
  • Added CONNECT_TIMEOUT config option for adjusting the bot connection timeout. Defaults to 10 seconds.
[1.7.4] 1.7.4 by replaceitem on Mar 29, 2026
Download
  • Updated to MC 26.1
[1.7.3] 1.7.3 by replaceitem on Mar 29, 2026
Download
  • Added support for checkbox, checkbox group and radio group components
  • Updated modal examples with new components
[1.7.2] 1.7.2 by replaceitem on Jan 21, 2026
Download
  • Fixed compatibility of __on_system_messsage event with other mods like better-fabric-console
  • Updated JDA version
[1.7.1] 1.7.1 by replaceitem on Dec 11, 2025
Download
  • Updated to Minecraft 1.21.11
[1.7.0] 1.7.0 by replaceitem on Nov 27, 2025
Download
## Changes

  • Updated to JDA 6.1.1. With that comes some breaking changes. See "Migrating" section below for necessary migrations

### Components

  • Added new Label component type
  • This replaces the use of Action rows in modals and the label property in text inputs
  • Action rows are now its own component type
  • Instead of the components in the message content schema being a list of lists of components,
action rows can be declared explicitly with a component of type action_row.
The old syntax of defining an action row from an array is still supported for backward compatibility and convenience.
  • The label field of text inputs has been removed. Use a label component instead.
  • Added support for components V2 via use_components_v2 in message content
  • Added new components from components V2 (See docs for details)
  • Separator
  • Container
  • Text display
  • Section
  • Thumbnail
  • Media gallery
  • File display
  • File upload

### Documentation

  • Message components example was split into seperate buttons and select menus example
  • Added misc components example for component V2 components
  • Added links to relevant examples to docs for functions and schemas
  • Updated modal example with file upload and select menu

## Migrating

To migrate your scripts, the following is necessary:

  • Converting action rows in modals to labels
  • Check the updated modal example in the documentation
[1.6.1] 1.6.1 by replaceitem on Jun 23, 2025
Download
  • Improved handling of error messages of api_exceptions based on JDA exceptions
[1.6.0] 1.6.0 by replaceitem on May 25, 2025
Download
Due to the [sunsetting of Javacord](https://github.com/user-attachments/assets/d5e8b4fe-60d1-4dcb-95e7-cf95933d1193),
this mod migrated to JDA, which meant that introducing breaking changes was inevitable,
so I chose to use this update to add more improvements that introduce breaking changes.

The naming convention of "parsables" in the documentation and changelogs have changed.
These map values used as function parameters are now referred to as "schemas" or "objects".
A "schema" is the format of the fields a parsable has,
while an "object" will be referred to as a map value following that schema.

## Breaking changes

The following changes may break existing scripts.
Make sure to update them to work with this new discarpet version.

### Event changes

Due to JDA having no built-in message caching, the following events were changed:

  • The __on_discord_message_edit event now no longer provides the previous message and whether it was actually edited
  • The __on_discord_message_delete now only gives the deleted message id and the channel object instead of the message object

### Function changes

  • The channel or message for creating a thread is no longer provided in the schema (*previously "parsable"*), but as an argument to dc_create_thread
  • dc_react has been split to dc_add_reaction(msg, emoji) and dc_remove_reaction(msg, emoji?, user?)
  • dc_set_channel_topic was removed in favor of the new dc_update_channel
  • Removed dc_get_display_name in favor of member~'effective_name'
  • Removed dc_get_timeout in favor of member~'timeout_end'
  • Removed dc_get_user_color in favor of member~'color'
  • Removed dc_get_user_roles in favor of member~'roles'
  • Added dc_update_presence() to replace dc_set_status() and dc_set_activity()

### Value changes

  • The command value types are now all the same value type dc_command and can be distinguished with command~'type'
  • Removed user~'discriminated_name, since discriminators are phased out by discord
  • Replaced reaction~'message' with reaction~'message_id' since messages are not cached anymore
  • slash_command_interaction~'arguments' and slash_command_interaction~'arguments_by_name'
no longer include the subcommand and subcommand group.
Additionally, slash_command_interaction_option~'options' was removed,
since subcommand groups and subcommands are no longer expressed as nested options,
but can be retrieved using interaction~'sub_command' or ~'sub_command_group'.
  • Replaced ~'is_subcommand_or_group' in slash command interaction option values with ~'type'

### Schema changes

  • Replaced thread schema channel_type with is_private.
  • Changes to message content schema
  • Renamed reply_to to referenced_message since it can now also used to forward messages
  • Added message_reference_type which can be set to forward to forward messages instead of replying
  • Made content field optional for messages without content, like forwarded messages
...
[1.5.6] 1.5.6 by replaceitem on Mar 31, 2025
Download
  • Updated to 1.21.5
  • New behaviour for errors while executing API requests.
Previously, functions would return true or false (sometimes null or 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 using try().
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_topic
  • dc_react
  • dc_set_nickname
  • dc_add_role
  • dc_remove_role
  • dc_set_name
  • dc_delete
  • These functions will now throw an exception instead of returning null. When successful they will return a value:
  • dc_send_message
  • dc_send_webhook
  • dc_create_webhook
  • dc_update_webhook
  • dc_create_thread
  • dc_create_application_command
  • dc_get_global_application_commands
  • dc_user_from_id
  • dc_message_from_id
  • dc_webhook_from_id
  • dc_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_interaction can still return null when the response type doesn't create a message. In all other cases it will either throw an exception or return a Message
  • 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. Use dc_create_application_command instead
  • Improved reloading of bots
  • Split dc_timeout into dc_get_timeout and dc_set_timeout
[1.5.5] 1.5.5 by replaceitem on Nov 09, 2024
Download
  • Fixed errors on Minecraft 1.21.3
[1.5.5] 1.5.5 by replaceitem on Apr 23, 2024
Download
  • Update to Minecraft 1.20.5
[1.5.4] 1.5.4 by replaceitem on Dec 11, 2023
Download
  • Updated to MC 1.20.4
[1.5.3] 1.5.3 by replaceitem on Nov 13, 2023
Download
  • Added new sticker value type
  • Added dc_sticker_from_id(stickerId)
  • Added new query options:
  • message~'webhook_id'
  • emoji~'id'
  • server~'emojis'
  • server~'stickers'
  • message~'sticker_ids'
  • Added stickers field to message content parsable
Carpet Discarpet Icon
Download Carpet Discarpet
Select game version
Select platform