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 from item. See loops.

Inputs

FieldInventScript nameValue
Message IDmessage_id
Channel IDchannel_id
Emoji IDemoji_id
Limitlimit
Loop Bodybodyblocks: func() { ... }

Outputs

FieldInventScript nameValue
Iteration Numberiteration_numbere.g. "1"
Total Iterationstotal_iterationse.g. "5"
User IDuser_id
Usernameusername

Example InventScript

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,
	})
}

More reactions blocks