> For the complete documentation index, see [llms.txt](https://micup.renbow.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://micup.renbow.dev/dosya-gonderme-ve-denetim-kaydi.md).

# Dosya gönderme ve denetim kaydı

## Dosya gönderme

```python
await bot.send_file(channel_id, "rapor.pdf", content="Rapor ektedir")
```

| Metot                                                                             | Dönüş     | Açıklama                                                                                                                  |
| --------------------------------------------------------------------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------- |
| `await bot.send_file(channel_id, path, content=None, **fields)`                   | `Message` | Dosyayı yükleyip mesaj olarak gönderir.                                                                                   |
| `await bot.upload_attachment(channel_id, path, filename=None, content_type=None)` | `dict`    | Sadece yükler, mesajda kullanılacak ek nesnesini döner. Sonra `send_message(..., attachments=[...])` ile gönderebilirsin. |

* Dosya boyutu en fazla 10 MB. Daha büyük dosyalar `MicupAPIError` ile reddedilir.
* Dosya adı ve içerik türü verilmezse dosya yolundan tahmin edilir.

## Denetim kaydı (audit log) okuma

```python
from micup import AuditAction

sayfa = await bot.list_audit_logs(guild_id, limit=20, action_type=AuditAction.MEMBER_BAN_ADD)
for girdi in sayfa["audit_log_entries"]:
    print(girdi["id"], girdi["user_id"], girdi.get("reason"))
```

| Parametre     | Varsayılan | Açıklama                                                                   |
| ------------- | ---------- | -------------------------------------------------------------------------- |
| `limit`       | `50`       | 0–100 arası.                                                               |
| `before`      | `None`     | Bu girdinin ID'sinden daha eski kayıtlar.                                  |
| `after`       | `None`     | Bu girdinin ID'sinden daha yeni kayıtlar. `before` ile birlikte verilemez. |
| `user_id`     | `None`     | Sadece bu kullanıcının yaptığı işlemler.                                   |
| `action_type` | `None`     | Sadece bu işlem türü (`AuditAction` sabitleri).                            |

Dönen sözlük: `audit_log_entries`, `users`, `webhooks`. Kayıtlar 45 gün saklanır. Gerekli yetki: sunucu denetim kaydını görme.

`AuditAction` içinde sık kullanılan değerler: `MEMBER_KICK`, `MEMBER_BAN_ADD`, `MEMBER_BAN_REMOVE`, `MEMBER_UPDATE`, `MEMBER_ROLE_UPDATE`, `MEMBER_MOVE`, `MEMBER_DISCONNECT`, `MESSAGE_DELETE`, `MESSAGE_BULK_DELETE`, `MESSAGE_PIN`, `MESSAGE_UNPIN`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://micup.renbow.dev/dosya-gonderme-ve-denetim-kaydi.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
