# Get Servers

> Retrieve a list of Discord servers the bot is a member of.

- ID: `get_discord_guilds`
- Type: Loop
- Category: [Servers](https://inventor.bot/docs/reference/blocks/servers.md)

> This data is retrieved from Discord and may not include all server information.

- Loop block: write `for item := range get_discord_guilds(Args{...}) { ... }` and read the current item's outputs from `item`. See loops.

**Inputs**

| Name | Required | Description | Value |
| --- | --- | --- | --- |
| `body` |  | Blocks to run for each server. | blocks: `func() { ... }` |

**Outputs**

| Name | Description | Value |
| --- | --- | --- |
| `iteration_number` | Current iteration (1-based). | e.g. `"1"` |
| `total_iterations` | Total number of iterations. | e.g. `"5"` |
| `server_id` | ID of the server. |  |
| `server_name` | Name of the server. |  |
| `server_icon_url` | Icon URL for the server. |  |

**Example**

```go
for guild := range get_discord_guilds() {
	send_text_message(Args{
		channel_id:      trigger.channel_id,
		message_content: "Server ID: " + guild.server_id,
	})
}
```