Teerathornmoon3

Discord.js Roblox

Feb 24th, 2021 (edited)
1,099
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const roblox = require('./node_modules/noblox.js');
  2.  
  3. if (command == 'roblox') {
  4.   const username = args[0]
  5.   if (username) {
  6.     roblox.getIdFromUsername(username).then(id => {
  7.       if (!id) {
  8.         message.reply(" ไม่พบผู้ใช้ **" + username + "**")
  9.       } else if (id) {
  10.         roblox.getPlayerInfo(parseInt(id)).then(function(info) {
  11.           const embed = new Discord.MessageEmbed()
  12.          
  13.           .setColor("fffff8")
  14.           .setTitle("ข้อมูลผู้เล่น")
  15.           .setImage(`https://www.roblox.com/Avatar-thumbnail/image?userId=${id}&width=420&height=420&format=png`)
  16.           .addField("> ชื่อผู้ใช้", info.username , false)
  17.           .addField("> คำอธิบาย", info.status, false)
  18.           .addField("> ไอดีของผู้เล่น", id, false)
  19.           .addField("> สร้างมาแล้ว(วัน)", info.age, false)
  20.           .addField("> ข้อมูลเพิ่มเติม",`[กดที่นี่](https://www.roblox.com/users/${id}/profile)`, false)
  21.           .setTimestamp()
  22.  
  23.           message.reply({embed})
  24.         })
  25.       }
  26.     })
  27.   }
  28. }
Add Comment
Please, Sign In to add comment