for reaction := range get_reactions(Args{
message_id: trigger.message_id,
channel_id: trigger.channel_id,
emoji_id: "...",
limit: "...",
}) {
send_text_message(Args{
channel_id: trigger.channel_id,
message_content: "User ID: " + reaction.user_id,
})
}
Get Reactions
LoopReactions
Get all reactions from a message.
- Loop block: the blocks placed inside it run once for each item, and can use the current item's outputs.
Inputs
Message IDRequired
ID of the message.
Channel IDRequired
ID of the channel.
Emoji IDRequired
Provide name:id or a:name:id (animated) or unicode emoji.
LimitRequired
Maximum number of reactions to return (1-100).
Loop Body
Blocks to run for each reaction.
Holds blocks
Outputs
Iteration Number
Current iteration (1-based).
Example: 1
Total Iterations
Total number of iterations.
Example: 5
User ID
ID of the user who reacted.
Username
Username of the user who reacted.
Build a bot using blocks like Get Reactions
Use this block in our visual flow editor. Bots are hosted 24/7 for free on inventor.bot.
Advanced Documentation
This documentation can be useful when using code mode. View as Markdown
ID:
get_reactions- Loop block: write
for item := range get_reactions(Args{...}) { ... }and read the current item's outputs fromitem. See loops.
Inputs
| Field | InventScript name | Value |
|---|---|---|
| Message ID | message_id | |
| Channel ID | channel_id | |
| Emoji ID | emoji_id | |
| Limit | limit | |
| Loop Body | body | blocks: func() { ... } |
Outputs
| Field | InventScript name | Value |
|---|---|---|
| Iteration Number | iteration_number | e.g. "1" |
| Total Iterations | total_iterations | e.g. "5" |
| User ID | user_id | |
| Username | username |