Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Unsupported type 'function'. #460

Open
3eif opened this issue Nov 21, 2021 · 1 comment
Open

Error: Unsupported type 'function'. #460

3eif opened this issue Nov 21, 2021 · 1 comment

Comments

@3eif
Copy link

3eif commented Nov 21, 2021

I'm trying to create a broadcast command which sends a message to all servers in all clusters that have a player but I'm getting the following error:

node:internal/process/promises:246
          triggerUncaughtException(err, true /* fromPromise */);
          ^

Error: Unsupported type 'function'.
    at Serializer.handleUnsupported (/home/seif/EarTensifier/node_modules/binarytf/dist/lib/Serializer.js:60:15)
    at Serializer.parse (/home/seif/EarTensifier/node_modules/binarytf/dist/lib/Serializer.js:41:34)
    at Serializer.parseValueObjectLiteral (/home/seif/EarTensifier/node_modules/binarytf/dist/lib/Serializer.js:186:18)
    at Serializer.parseObject (/home/seif/EarTensifier/node_modules/binarytf/dist/lib/Serializer.js:134:49)
    at Serializer.parse (/home/seif/EarTensifier/node_modules/binarytf/dist/lib/Serializer.js:38:67)
    at Serializer.parseValueObjectLiteral (/home/seif/EarTensifier/node_modules/binarytf/dist/lib/Serializer.js:186:18)
    at Serializer.parseObject (/home/seif/EarTensifier/node_modules/binarytf/dist/lib/Serializer.js:134:49)
    at Serializer.parse (/home/seif/EarTensifier/node_modules/binarytf/dist/lib/Serializer.js:38:67)
    at Serializer.parseValueObjectMap (/home/seif/EarTensifier/node_modules/binarytf/dist/lib/Serializer.js:197:18)
    at Serializer.parseObject (/home/seif/EarTensifier/node_modules/binarytf/dist/lib/Serializer.js:135:46)

Code:

const players = await client.shard.broadcastEval(`this.music.players.each(p => p.textChannel.send('${message}'))`);

I tried looking at #357 but don't see how this could apply in my use case since I want to send a message in all clusters and not just certain ones.

@ChandanOP
Copy link

Same that error occurred with me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants