0
uservalue =   async function(id){
                  try{
                    var user;
                    user =   await client.users.fetch(id)
                    return user.username  
                  }catch(e){
                    return "user is not found"
                  }
                 }
                  const liste = filter.map(async (b) =>`

${i++}. word: ${b.kelime} Kimlik: ${b.id} upload date: ${b.date} (${moment.duration(Date.now() - (b.time_amp)).format(Y [year] D [day] H [hour] m [minute])} before) added by: ${await uservalue(b.ekleyen)}`).join('\n')

Account
  • 15
  • 4
  • the Array map function does not care about async callbacks. It means the map function does not await promises. This link may help: https://stackoverflow.com/questions/40140149/use-async-await-with-array-map – Raeisi Mar 17 '23 at 16:14

0 Answers0