Git Product home page Git Product logo

azael_lib-userprofiles's Introduction

azael_lib-userprofiles

FiveM - Get Discord or Steam User Profiles

ความต้องการ

ดาวน์โหลด

ใช้ Git

cd resources
git clone https://github.com/Azael-Dev/azael_lib-userprofiles [local]/[azael]/[library]/azael_lib-userprofiles

ด้วยตนเอง

ติดตั้ง

  • เพิ่มสิ่งนี้ไปยัง server.cfg
ensure azael_lib-userprofiles
  • สามารถตรวจสอบการกำหนดค่าเพิ่มเติมได้ที่ server.config.js

วิธีใช้งาน

รับโปรไฟล์ Discord

Lua

exports['azael_lib-userprofiles']:Discord(identifier, options)

Parameter

Name Type Required Description
identifier string ✔️ ตัวระบุ Discord ผู้เล่น (discord:000000000000000000)
options table { botToken, imageData }
options.botToken string Discord Bot Token (หากไม่ระบุมีความจำเป็นที่จะต้องเพิ่ม set discord_botToken "your_token" ที่ไฟล์ server.cfg)
options.imageData boolean แปลง Image URL เป็น Base64 Image (avatar_data)

Return

Type Description
table or nil User Object: https://discord.com/developers/docs/resources/user#user-object

Example

local profile = exports['azael_lib-userprofiles']:Discord(identifier, { botToken = 'bot_token', imageData = true })

if type(profile) == 'table' then
    print(('%s#%s'):format(profile.username, profile.discriminator)) -- Azael Dev#0078
end

รับโปรไฟล์ Steam

Lua

exports['azael_lib-userprofiles']:Steam(identifier, options)

Parameter

Name Type Required Description
identifier string ✔️ ตัวระบุ Steam (Hex) ผู้เล่น (steam:0000X0000X0000X)
options table { steamKey, imageData }
options.steamKey string Steam Web API Key (หากไม่ระบุมีความจำเป็นที่จะต้องเพิ่ม set steam_webApiKey "your_key" ที่ไฟล์ server.cfg)
options.imageData boolean แปลง Image URL เป็น Base64 Image (avatar_data)

Return

Type Description
table or nil Public Data: https://developer.valvesoftware.com/wiki/Steam_Web_API#Public_Data

Example

local profile = exports['azael_lib-userprofiles']:Steam(identifier, { steamKey = 'api_key', imageData = true })

if type(profile) == 'table' then
    print(profile.personaname) -- Azael Dev
end

เครดิต

กฎหมาย

ใบอนุญาต

ลิขสิทธิ์ (C) Azael Dev - สงวนลิขสิทธิ์

  • ห้ามใช้ชิ้นส่วนใดๆ ของซอฟต์แวร์นี้ในผลิตภัณฑ์ / บริการเชิงพาณิชย์
  • ห้ามนำซอฟต์แวร์นี้ไปขายต่อ
  • คุณจะต้องไม่จัดหาสิ่งอำนวยความสะดวกใด ๆ ในการติดตั้งซอฟต์แวร์นี้ในผลิตภัณฑ์ / บริการเชิงพาณิชย์
  • หากคุณแจกจ่ายซอฟต์แวร์นี้ใหม่ คุณต้องเชื่อมโยงไปยังที่เก็บดั้งเดิมที่ azael_lib-userprofiles
  • ลิขสิทธิ์นี้ควรปรากฏในทุกส่วนของรหัสโครงการ

License (ENG): https://github.com/Azael-Dev/azael_lib-userprofiles/blob/main/LICENSE

azael_lib-userprofiles's People

Contributors

azael-dev avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.