Jump to content
McKay Development

Benja1006

Member
  • Posts

    1
  • Joined

  • Last visited

Everything posted by Benja1006

  1. Hi, i'm currently trying to make a simple donation bot, and wan't to use Client.getPersonas() to get their usernames. Currently it seems as though the program is skipping over the function. It doesn't return an error, but it also doesn't do anything, and anything in the callback isn't run. I would love some help. This is my code: console.log(offer.partner.accountid); console.log(toReceive); client.getPersonas([offer.partner.accountid], (err, personas) => { if (err){ console.log(err); } console.log(offer.partner.accountid.getSteamID64()); console.log(personas); var partnerPersona = personas[offer.partner.accountid.getSteamID64()]; var partnerName = partnerPersona ? partnerPersona.player_name : ("[" + offer.partner.accountid.getSteamID64() + "]"); console.log(partnerPersona); // the player's name is now available as name return bot.channels.get(process.env.DEFAULT).send(`Thank you ${partnerName} for donating ${toReceive}!`); }); console.log("afterwards"); I see the first to console.logs in the console, as well as the last one, but nothing on the inside.
×
×
  • Create New...