Get Server Bans

LoopUsers

Retrieve a list of banned users in a server.

Only the first 1000 bans are returned.
  • Loop block: the blocks placed inside it run once for each item, and can use the current item's outputs.

Inputs

Server IDRequired

ID of the server to retrieve bans from.

Loop Body

Blocks to run for each ban.

Holds blocks

Outputs

User ID

ID of the banned user.

Reason

Reason for the ban.

Ban Reason

Reason for the ban (alias).

Build a bot using blocks like Get Server Bans

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_server_bans
  • Loop block: write for item := range get_server_bans(Args{...}) { ... } and read the current item's outputs from item. See loops.

Inputs

FieldInventScript nameValue
Server IDserver_id
Loop Bodybodyblocks: func() { ... }

Outputs

FieldInventScript nameValue
User IDuser_id
Reasonreason
Ban Reasonban_reason

Example InventScript

for serverBan := range get_server_bans(Args{server_id: trigger.server_id}) {
	send_text_message(Args{
		channel_id:      trigger.channel_id,
		message_content: "User ID: " + serverBan.user_id,
	})
}

More users blocks