errorism.dcl
Usage
รายการของการฟังก์ชัน และตัวอย่างการใช้งาน
ควรจะมีความรู้ขั้นพื้นฐานการเขียนสคริปต์ Lua และการใช้งานฟังก์ชันต่างๆ ก่อน เหมาะกับผู้พัฒนาเท่านั้น
errorism.dcl
ระบบการส่งข้อมูลไปยัง Discord โดยมีการแยกประเภทและความสำคัญ ทำให้สามารถอ่านข้อมูลได้ง่ายขึ้น
Features
Export
สำหรับดึงค่า Player Identifier (Steam,Discord,License,Name,Avatar,Token,etc)Export
ส่ง Log Discord ที่เกิดมาเพื่อแก้ปัญหาการอ่านยาก- Log เริ่มต้นที่มีมาให้ onPlayerConnect(เข้าเซิฟ), onPlayerDroped(ออกเซิฟ), onPlayerDied(สาเหตุการตาย)
- Message สามารถส่งมาเป็น table หรือ string เดี่ยวๆได้
- มี Prefix ที่ทำให้ Message อ่านง่านขึ้นเช่น -,+ และ --- (ตามรูปแนบ)
- Preset (Configurable)
- Priority (Configurable)
- Webhook Shorthand (Configurable) ใช้แทนตัวย่อในการใส่ Webhook
- สามารถใช้แทนสคริป
azael_dc-serverlogs
ได้โดยไม่ต้องแก้ไขใดๆ - ป้องกันการเกิด rate limit ของ Discord
- ถ้า log ส่งยังไม่ครบขณะเซิฟจะรีสตาร์ท จะทำการ save เป็น file .json เพื่อไม่ให้มีข้อมูลตกหล่น
API Reference [ใช้ได้ทั้งฝั่ง client และ server]
ดึงข้อมูลผู้เล่น (ไม่จำเป็นต้องใช้ก่อนส่ง log)
Parameter | Type | Description |
---|---|---|
source | int | Required. Player Server Id |
return | table | steam,steamDec,ip,discord,license,license2,xbl,live,fivem,name,avatar,url,token |
ส่ง Log ไปยัง Discord
Parameter | Type | Description |
---|---|---|
webhook | string | Required. Discord webhook url / Shorthand (In Webhook Config) |
source | int | Required. Player Server Id |
message | string or string[] | Required. Player Server Id |
preset | string | Preset of this log (In Config file) |
priority | string | Priority of this log (In Config file) |
imgUrl | string | Image Url (it will override by the preset that has screenshot on) |