Pass variables into <ShardingManager>.broadcastEval

I have this code:
const params = {
  guild_id: "",
  channel_id: "",
  shard_id: 0
}

// @ts-ignore
const result = await manager.broadcastEval(async (client: CustomClient) => {
  const guild = client.guilds.cache.get(params.guild_id)
  const channel = guild?.channels.cache.get(params.channel_id);

  return channel?.id

}, { shard: params.shard_id });

console.log(result);

But i get the following error when i run this code:
Error [ReferenceError]: msg is not defined
    at eval (eval at _eval (/media/cleiton/Arquivos/Pastas/Documentos/Projetos/bot/api/node_modules/discord.js/src/client/Client.js:482:12), <anonymous>:2:55)

So i want to know... How can i pass the variable
params
to the broadcastEval? With the vanilla javascript eval i can pass the variables into strings, but how can i do in shardingManager?
Was this page helpful?