# Örnek Kullanım

<pre class="language-javascript"><code class="lang-javascript"><strong>const { YamlDatabase } = require("five.db");
</strong>const db = new YamlDatabase();
const client = require("discord.js");

client.on("messageCreate", async (message) => {

  if(message.content.includes("!sistem-aç")){
  
   db.set("saas",true); // 'saas' İsminde Veri Oluşturup Ona 'true' Değerini Veriyoruz
   message.reply("Sistem Başarıyla Açıldı.")

  }else if(message.content.includes("!sistem-kapat")){

   db.set("saas",false); // 'saas' İsmindeki Verimizi 'false' Değeriyle Değiştiriyoruz
   message.reply("Sistem Başarıyla Kapatıldı.")

  }else{

  let kontrol = await db.get("saas"); // 'saas' İsmindeki Verimizin Kayıtlı Olan Değerlerini Alıyoruz
  // Ve Verimizi kontrol Olarak Tanımlıyoruz
  
    if (kontrol == true) { // kontrol(Aldığımız Veri) 'true' Değerine Eşit İse Devam Ettir
    if (message.content.toLowerCase() === "sa"){
      message.reply("Aleyküm Selam.");
    }
  }
}
});
</code></pre>


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://fivesobes.gitbook.io/five.db/ornek-kullanim.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
