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

Not working with latest gramjs #9

Open
sayem314 opened this issue Mar 16, 2022 · 1 comment
Open

Not working with latest gramjs #9

sayem314 opened this issue Mar 16, 2022 · 1 comment

Comments

@sayem314
Copy link

The last compatible version I found is v2.5.0. With the latest version, there is types error which makes it impossible to run. The library needs to be updated to make it work on the newer gramjs version. Here is the error data:

yarn run v1.22.17
$ /home/sayem/workflow/projects/TelegramGroupTools/node_modules/.bin/ts-node src/main.ts
/home/sayem/workflow/projects/TelegramGroupTools/node_modules/ts-node/src/index.ts:820
    return new TSError(diagnosticText, diagnosticCodes);
           ^
TSError: ⨯ Unable to compile TypeScript:
src/main.ts:115:43 - error TS2345: Argument of type 'import("/home/sayem/workflow/projects/TelegramGroupTools/node_modules/telegram/client/TelegramClient").TelegramClient' is not assignable to parameter of type 'import("/home/sayem/workflow/projects/TelegramGroupTools/node_modules/gram-tgcalls/node_modules/telegram/client/TelegramClient").TelegramClient'.
  The types returned by 'inlineQuery(...)' are incompatible between these types.
    Type 'Promise<import("/home/sayem/workflow/projects/TelegramGroupTools/node_modules/telegram/tl/custom/inlineResults").InlineResults>' is not assignable to type 'Promise<import("/home/sayem/workflow/projects/TelegramGroupTools/node_modules/gram-tgcalls/node_modules/telegram/tl/custom/inlineResults").InlineResults>'.
      Type 'import("/home/sayem/workflow/projects/TelegramGroupTools/node_modules/telegram/tl/custom/inlineResults").InlineResults' is not assignable to type 'import("/home/sayem/workflow/projects/TelegramGroupTools/node_modules/gram-tgcalls/node_modules/telegram/tl/custom/inlineResults").InlineResults'.
        Types have separate declarations of a private property 'result'.

115           const tgcalls = new GramTGCalls(client, chat);
                                              ~~~~~~
src/main.ts:134:43 - error TS2345: Argument of type 'import("/home/sayem/workflow/projects/TelegramGroupTools/node_modules/telegram/client/TelegramClient").TelegramClient' is not assignable to parameter of type 'import("/home/sayem/workflow/projects/TelegramGroupTools/node_modules/gram-tgcalls/node_modules/telegram/client/TelegramClient").TelegramClient'.

134           const tgcalls = new GramTGCalls(client, chat);
                                              ~~~~~~

    at createTSError (/home/sayem/workflow/projects/TelegramGroupTools/node_modules/ts-node/src/index.ts:820:12)
    at reportTSError (/home/sayem/workflow/projects/TelegramGroupTools/node_modules/ts-node/src/index.ts:824:19)
    at getOutput (/home/sayem/workflow/projects/TelegramGroupTools/node_modules/ts-node/src/index.ts:1014:36)
    at Object.compile (/home/sayem/workflow/projects/TelegramGroupTools/node_modules/ts-node/src/index.ts:1322:43)
    at Module.m._compile (/home/sayem/workflow/projects/TelegramGroupTools/node_modules/ts-node/src/index.ts:1454:30)
    at Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
    at Object.require.extensions.<computed> [as .ts] (/home/sayem/workflow/projects/TelegramGroupTools/node_modules/ts-node/src/index.ts:1458:12)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) {
  diagnosticCodes: [ 2345, 2345 ]
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
@rojvv
Copy link
Member

rojvv commented Mar 16, 2022

You can use tgcalls-next until this package is updated to support it.

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