Advertisement
JustHassan

Untitled

Aug 16th, 2021
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. client.on("message", async (msg) => {
  2. if (msg.content.toLowerCase() === prefix + "players") {
  3. if(!msg.member.hasPermission('ADMINISTRATOR')) return;
  4. let test = [``];
  5. await srv.getCurrentPlayers().then(data => JSON.stringify(data.forEach(e => test.push(`Name :${e.name} \nID :${e.id} \nPing :${e.ping} \n${e.identifiers.map(t =>t).join('\n')}\n\n`))))
  6. msg.channel.send('```'+ test + '```',{
  7. split: {
  8. prepend:'```',
  9. append:'```'
  10. }
  11. })
  12.  
  13. }
  14. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement