export default defineEventHandler(async (event) => {
  const { discordId, content } = await readBody(event);

  const coll = db.collection('users');
  const doc = await coll.findOne({ 'discord.id': discordId });

  await sendRconCommand(`tellraw @a {"text":"(DC) ${doc.discord.username} > ${content}"}`)

  return { status: 'success' }
});
