Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

153
Views
La matriz de actualización de Supabase pasa la matriz de antes como un valor

Actualmente estoy desarrollando un bot discord.js con node.js y estoy usando supabase.js para la base de datos.

 const roleId = interaction.options.getRole('role').id; const { data: memberArray } = await supabase .from('guilds') .select('member_join[]') .eq('guild_id', `${interaction.guild.id}`); if (!memberArray.includes(roleId)) { memberArray.push(roleId); } else { memberArray.splice(roleId, 1); } const { data: endResult } = await supabase .from('guilds') .upsert([{ guild_id: `${interaction.guild.id}`, guild_name: `${interaction.guild.name}`, member_join: memberArray }]) .eq('guild_id', `${interaction.guild.id}`); const message = 'Theese are the current roles I give out to new user now: ' + memberArray; return await interaction.reply({ content: message, ephemeral: true });

Si agrego el primer rol, la matriz está bien ( [ '911629023052972083' ] ), sin embargo, si agrego un segundo (o elimino uno), se verá así: [ '{"member_join":["911629023052972083"]}', '911629064584966175' ]

¿Cómo puedo arreglar esto?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!