المعاملات
namestringمطلوباسم الملاحظة كما هو مخزن - الشكل المحول، )أ( -مشاهدات
القيمة المُعادة
await api.memory.delete("tone-of-voice");
// { ok: true, deleted: true }
await api.memory.delete("never-existed");
// { ok: true, deleted: false } ← no errorapi.memory.delete("tone-of-voice")
# {"ok": True, "deleted": True}
api.memory.delete("never-existed")
# {"ok": True, "deleted": False} ← no errorوَهذَا مَا يَجِبُ أَنْ يَتَمَكَّنَ مِنْهُمْ مِنْ مَعْرِفَةِ ٱلْأَمْرِ .
const { deleted } = await api.memory.delete(name);
ui.toast(deleted ? `Forgot "${name}".` : `There was nothing called "${name}".`);deleted = api.memory.delete(name)["deleted"]
ui.toast(f'Forgot "{name}".' if deleted else f'There was nothing called "{name}".')%
تم تحويل الأسماء عند حفظها، لذا الاسم الذي انتقلت إليه save() ليس اسم الاسم الذي يحتوي عليه هذا ال_ احذف مع ماذا list() أو أن الدعوة تنجح ولا تزيل شيئاً
await api.memory.save({ name: "Tone Of Voice", content: "…" });
await api.memory.delete("Tone Of Voice"); // { deleted: false } — stored as "tone-of-voice"
const notes = await api.memory.list();
const match = notes.find((n) => n.description.includes("written to"));
if (match) await api.memory.delete(match.name); // this worksapi.memory.save(name="Tone Of Voice", content="…")
api.memory.delete("Tone Of Voice") # {"deleted": False} — stored as "tone-of-voice"
notes = api.memory.list()
match = next((n for n in notes if "written to" in n["description"]), None)
if match:
api.memory.delete(match["name"]) # this worksلقد ذهب
لا نفايات، لا نسخ، ملاحظة هي بضعة نصوص نصية، والاحتفاظ بنسخ من الأشياء المنسية
// Keep a copy yourself if you want one
const note = (await api.memory.list()).find((n) => n.name === name);
if (note) await audit.record({ action: "memory.delete", note, by: userId });
await api.memory.delete(name);# Keep a copy yourself if you want one
note = next((n for n in api.memory.list() if n["name"] == name), None)
if note:
audit.record(action="memory.delete", note=note, by=user_id)
api.memory.delete(name).... .... .... .... ... ... ... ... ... ... ... ... ... ...
فَٱلْمَحَبَّةُ مِنْ مَسْؤُولِي ٱلْحَقِّ ، ٱلْمَسِيحِيِّ ، ٱلْأَرْضِ ، ٱلْمُسْتَقْدَمِ ، لِأَنَّهُ بَدَى قَدِيمًا ، يَتَخَلَّى عَنْهُمْ ، وَيَسْتَحِقُّ ٱلْمَرْكَزُ إِلَى ٱلْمَسْؤُولِيَّةِ .
‹ انسي كل شيء ، من السهل تنفيذه ومن الصعب التراجع عنه ، فإذا عرضته ، فقل ما سينسى بالضبط وأري القائمة اولا .