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

Unable to use Api.messages.UpdateDialogFilter #721

Open
JonathanJoe1 opened this issue Sep 17, 2024 · 0 comments
Open

Unable to use Api.messages.UpdateDialogFilter #721

JonathanJoe1 opened this issue Sep 17, 2024 · 0 comments

Comments

@JonathanJoe1
Copy link

I'm trying to create chat folder with updatedialogfilter, and below is my code:

//code
await bot.invoke(new Api.messages.UpdateDialogFilter({
id: 3,
filter: new Api.DialogFilter({
id: 3,
title: "Chat folder",
includePeers: [],
pinnedPeers: [-1002233439929],
excludePeers: []
})
}));
console.log('Filter updated successfully.');
} catch (error) {
console.error('Error updating filter:', error);
}

I try to fill all the correct peer, and it's still an issue.

//error
Error updating filter: Error: Required object DialogFilter of undefined is undefined
at argToBytes (C:\Users\Administrator\Desktop\GroupX\node_modules\telegram\tl\api.js:111:23)
at C:\Users\Administrator\Desktop\GroupX\node_modules\telegram\tl\api.js:385:80
at Array.map ()
at VirtualClass.getBytes (C:\Users\Administrator\Desktop\GroupX\node_modules\telegram\tl\api.js:385:69)
at argToBytes (C:\Users\Administrator\Desktop\GroupX\node_modules\telegram\tl\api.js:113:22)
at VirtualClass.getBytes (C:\Users\Administrator\Desktop\GroupX\node_modules\telegram\tl\api.js:415:42)
at new RequestState (C:\Users\Administrator\Desktop\GroupX\node_modules\telegram\network\RequestState.js:13:29)
at Object.invoke (C:\Users\Administrator\Desktop\GroupX\node_modules\telegram\client\users.js:34:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async setFolder (C:\Users\Administrator\Desktop\GroupX\base.js:113:25)

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

1 participant