Actions
Learn about all the actions you can use in ItsMyBot to perform various tasks and automate your server management.
The actions are the main part of the bot. They are used to perform actions when a trigger is met. You can find more information about how to use them here.
All Actions
addCoins
Add coins to a user.
Prop
Type
actions:
- id: addCoins
args:
amount: 100 # Amount of coins to addaddInviteBonus
Add bonus invites to a user. Requires the Invite Traker addon.
Prop
Type
actions:
- id: addInviteBonus
args:
amount: 5 # Amount of bonus invitesaddReaction
Add a reaction to a message. The reaction can be an emoji or a custom emoji.
Prop
Type
actions:
- id: addReaction
args:
value: "✅"addRole
Add a role to a member. The role can be a string or an array of strings.
Prop
Type
actions:
- id: addRole
args:
value: "Admin" # Role ID or name
- id: addRole
args:
value:
- "Admin" # Role ID or name
- "Moderator" # Role ID or nameaddTag
Add a tag to a thread. The tag can be a string or an array of strings.
Prop
Type
actions:
- id: addTag
args:
value: "Tag1" # Tag ID
- id: addTag
args:
value:
- "Tag1" # Tag ID
- "Tag2" # Tag IDcloseThread
Close a thread.
actions:
- id: closeThreadcreateChannel
Create a channel.
Can triggers follow-up actions
Prop
Type
actions:
- id: createChannel
args:
value: "new-channel" # Channel name, support placeholders & list for random names
channel-type: "text" # Channel type
parent: "123456789012345678" # Parent channel ID
description: "This is a new channel" # Channel description, support placeholders & list for random descriptions
permission-overwrites:
- id: "123456789012345678" # Role or user ID
allow: ["VIEW_CHANNEL"] # Permissions to allow
deny: ["SEND_MESSAGES"] # Permissions to deny
- id: createChannel
args:
value: "simple" # Channel name, support placeholders & list for random namescreateThread
Create a thread in a channel. If made in a forum channel, it will create a forum post. If made in a text channel, it will create a thread.
Can triggers follow-up actions
Prop
Type
actions:
- id: createThread
args:
value: "Hello there !" # Thread name
- id: createThread
args:
value:
- "Thread 1" # Thread name
- "Thread 2" # Thread name
duration: 3600 # Thread auto archive duration in seconds (1 hour)
private: true # Whether the thread is private or not
tags: # Thread tags ID, optional (Only for forum posts)
- "123456789012345678" # Tag ID
- "234567890123456789" # Tag ID
components:
- type: text-display
content: "This is a forum post" # Required for forum postscrosspostMessage
Crosspost a message from an announcement channel to other channels.
actions:
- id: crosspostMessagedeleteChannel
Delete a channel.
actions:
- id: deleteChanneldeleteMessage
Delete a message.
actions:
- id: deleteMessagedeleteThread
Delete a thread.
actions:
- id: deleteThreadeditChannel
Edit a channel.
Prop
Type
actions:
- id: editChannel
args:
value: "edited-channel" # Channel name, support placeholders & list for random names
parent: "123456789012345678" # Parent channel ID
description: "This is an edited channel" # Channel description, support placeholders & list for random descriptions
permission-overwrites:
- id: "123456789012345678" # Role or user ID
allow: ["VIEW_CHANNEL"] # Permissions to allow
deny: ["SEND_MESSAGES"] # Permissions to deny
- id: editChannel
args:
value: "simple-edited" # Channel name, support placeholders & list for random nameseditMessage
Edit a message. You can see the message configuration for more information.
Prop
Type
actions:
- id: editMessage
args:
components:
- type: text-display
content: "Hello there !"editThread
Edit a thread.
Prop
Type
actions:
- id: editThread
args:
value: "edited-thread" # Thread name, support placeholders & list for random names
duration: 3600 # Thread auto archive duration in seconds (1 hour)
tags: # Thread tags ID, optional (Only for forum posts)
- "123456789012345678" # Tag ID
- "234567890123456789" # Tag ID
- id: editThread
args:
value: "simple-edited" # Thread name, support placeholders & list for random nameslockThread
Lock a thread. This will prevent users from sending messages in the thread.
actions:
- id: lockThreadmetaAdd
Increase the value of a key in the meta data. Only works with number type.
Prop
Type
actions:
- id: metaAdd
args:
key: "xp" # Key to add the value to
value: 100 # Value to addmetaListAdd
Add a value to a meta list. Only works with list type.
Prop
Type
actions:
- id: metaListAdd
args:
key: "inventory" # Key to add the value to
value: "item_1" # Value to addmetaListRemove
Remove a value from a meta list. Only works with list type.
Prop
Type
actions:
- id: metaListRemove
args:
key: "inventory" # Key to remove the value from
value: # Value to removeactions:
- id: metaListRemove
args:
key: "inventory" # Key to remove the value from
value: "item_1" # Value to removemetaRemove
Remove a value from the meta data.
Prop
Type
actions:
- id: metaRemove
args:
key: "xp" # Key to remove the value frommetaSet
Set a value to a key in the meta data.
Prop
Type
actions:
- id: metaSet
args:
key: "xp" # Key to set the value to
value: 100 # Value to setmetaSubtract
Decrease the value of a key in the meta data. Only works with number type.
Prop
Type
actions:
- id: metaSubtract
args:
key: "xp" # Key to subtract the value from
value: 50 # Value to subtractmetaToggle
Toggle a value in the meta data. Only works with boolean type.
Prop
Type
actions:
- id: metaToggle
args:
key: "is_active" # Key to toggle the value foropenThread
Open a thread.
actions:
- id: openThreadpinMessage
Pin a message.
actions:
- id: pinMessagerandomAction
Run a random action from a list of actions. The actions can be defined in the actions array. If the actions array is empty, the action will do nothing.
Prop
Type
actions:
- id: randomAction
args:
actions:
- id: sendMessage
args:
content: "Hello there !"
- id: addReaction
args:
value: "✅"removeCoins
Remove coins from a user.
Prop
Type
actions:
- id: removeCoins
args:
amount: 50 # Amount of coins to removeremoveInviteBonus
Remove bonus invites to a user. Requires the Invite Traker addon.
Prop
Type
actions:
- id: removeInviteBonus
args:
amount: 5 # Amount of bonus invitesremoveReaction
Remove a reaction from a message.
Prop
Type
actions:
- id: removeReaction
args:
value: "✅" # Remove a specific reactionremoveRole
Remove a role from a member.
Prop
Type
actions:
- id: removeRole
args:
value: "Admin" # Role ID or name
- id: removeRole
args:
value:
- "Admin" # Role ID or name
- "Moderator" # Role ID or nameremoveTag
Remove a tag from a thread.
Prop
Type
actions:
- id: removeTag
args:
value: "Tag1" # Tag ID
- id: removeTag
args:
value:
- "Tag1" # Tag ID
- "Tag2" # Tag IDreply
Reply to a message or an interaction. You can see the message configuration for more information. Can triggers follow-up actions
Prop
Type
actions:
- id: reply
args:
content: "Hello there !"
- id: reply
args:
components:
- type: text-display
content: "This is a reply"resetCooldown
Reset a cooldown for a user.
Prop
Type
actions:
- id: resetCooldown
args:
value: "daily_reward" # Cooldown namesendMessage
Send a message. You can see the message configuration for more information.
Prop
Type
actions:
- id: sendMessage
args:
content: "Hello there !"
- id: sendMessage
args:
components:
- type: text-display
content: "This is a message"showModal
Display a modal to the current user. You can see the modal configuration for more information.
This action only works when the current context contains an interaction that can open a modal, such as a slash command, a button click, or a select menu submit.
Prop
Type
actions:
- id: showModal
args:
title: "Feedback"
custom-id: "script_feedback_modal:premium"
components:
- type: label
label: "Your message"
component:
type: text-input
custom-id: "message"
style: "Paragraph"
required: truesendPreset
Send a preset message. Requires the Presets addon.
Prop
Type
actions:
- id: sendPreset
args:
preset: "welcome_message" # Preset ID or namesendPrivateMessage
Send a private message to a user. You can see the message configuration for more information. If the user has private messages disabled, the message will not be sent.
Prop
Type
actions:
- id: sendPrivateMessage
args:
content: "Hello there !"
- id: sendPrivateMessage
args:
components:
- type: text-display
content: "This is a private message"sendRequest
Send a http request. New variables will be added when you trigger an action after this action. With the format [[data_<object>]]. If you want a value that is inside an object, you can add the path with underscore _. For example, if you want the value of user.id, you can use %data_user_id%.
*Can triggers follow-up actions
Prop
Type
- id: sendRequest
args:
value: 'https://api.mcstatus.io/v2/status/java/mc.hypixel.net:25565' # URL
follow-up-actions:
- id: sendMessage
args:
content: "Players [[data_players_online]]/[[data_players_max]] | Version [[data_version_name_clean]]"setCoins
Set the amount of coins for a user.
Prop
Type
actions:
- id: setCoins
args:
amount: 1000 # Amount of coins to setsetCooldown
Set a cooldown for a user.
Prop
Type
actions:
- id: setCooldown
args:
value: "daily_reward" # Cooldown name
duration: 86400 # Duration in seconds (1 day)setInviteBonus
Set bonus invites to a user. Requires the Invite Tracker addon.
Prop
Type
actions:
- id: setInviteBonus
args:
amount: 5 # Amount of bonus invitessetTag
Set tags to a thread.
Prop
Type
actions:
- id: setTag
args:
value: "Tag1" # Tag ID
- id: setTag
args:
value:
- "Tag1" # Tag ID
- "Tag2" # Tag IDstartThread
Start a thread from a message.
Can triggers follow-up actions
Prop
Type
actions:
- id: startThread
args:
value: "Hello there !" # Thread name
- id: startThread
args:
value:
- "Thread 1" # Thread name
- "Thread 2" # Thread name
duration: 3600 # Thread auto archive duration in seconds (1 hour)timeoutMember
Timeout a member for a certain duration. The duration is in seconds.
Prop
Type
actions:
- id: timeoutMember
args:
duration: 3600 # Duration in seconds (1 hour)unlockThread
Unlock a thread. This will allow users to send messages in the thread.
actions:
- id: unlockThreadunpinMessage
Unpin a message.
actions:
- id: unpinMessageIntroduction
Learn about scripting in ItsMyBot, a powerful feature that allows you to create custom scripts to automate tasks, respond to events, and extend the bot's functionalities.
Conditions
Learn about all the conditions you can use in ItsMyBot to create dynamic and interactive scripts, commands, and components.