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

InviteToChannelRequest: Uncaught (in promise) TypeError: bigInt is undefined #42

Closed
kimnamcham opened this issue Nov 13, 2020 · 2 comments

Comments

@kimnamcham
Copy link

kimnamcham commented Nov 13, 2020

How to call request InviteToChannelRequest? This is my code:


const channelIdInvite = inviteId.value
const InputPeerUser = []
    listUsers.forEach(function (user) {
        InputPeerUser.push(new types.InputUser({
            user_id: user["id"],
            access_hash: user["accessHash"],
        }))
    })
    const InputChannel = new types.InputChannel({
        channel_id: parseInt(channelIdInvite),
        access_hash: 4408054091230359217,
    })
    const result = await client.invoke(new functions.channels.InviteToChannelRequest(
        {
            channel: InputChannel,
            users: InputPeerUser,
        },
    ))

This is console log error:

Uncaught (in promise) TypeError: bigInt is undefined
readBufferFromBigInt webpack://gramjs/./gramjs/Helpers.js?:62
getBytes webpack://gramjs/./gramjs/tl/types/index.js?:531
getBytes webpack://gramjs/./gramjs/tl/functions/channels.js?:1805
RequestState webpack://gramjs/./gramjs/network/RequestState.js?:13
send webpack://gramjs/./gramjs/network/MTProtoSender.js?:289
_callee7$ webpack://gramjs/./gramjs/client/TelegramClient.js?:691
Babel 10
file:///Users/apple/congviec/WorkSpace/TelegramProject/gramjs-master/examples/simpleLogin.js:206
EventListener.handleEvent* file:///Users/apple/congviec/WorkSpace/TelegramProject/gramjs-master/examples/simpleLogin.js:177

What 's wrong? Anyone help, pls?

@foodornt
Copy link

I think you need to make a tsconfig file
just type tsc --init

@mannguyen0107
Copy link
Contributor

@kimnamcham have you been able to get this working? it seem that this has nothing to do with gramjs maybe @painor can close this issue to clean the issues up abit :D

@painor painor closed this as completed Jan 11, 2022
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

4 participants