Created
March 24, 2023 20:51
-
-
Save waptik/7b6b0c019d553bb1f2df16c28a49cadd to your computer and use it in GitHub Desktop.
type error when using grammy@1.15.3 with current version of gramm_chat_members plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When i hover `chatMembers`, i get: | |
``` | |
Argument of type 'Composer<ChatMembersContext>' is not assignable to parameter of type 'Middleware<GrammyContext>'. | |
Type 'Composer<ChatMembersContext>' is not assignable to type 'MiddlewareObj<GrammyContext>'. | |
The types returned by 'middleware()' are incompatible between these types. | |
Type 'MiddlewareFn<ChatMembersContext>' is not assignable to type 'MiddlewareFn<GrammyContext>'. | |
Types of parameters 'ctx' and 'ctx' are incompatible. | |
Type 'GrammyContext' is not assignable to type 'ChatMembersContext'. | |
Type 'SessionFlavor<GrammySession> & { conversation: ConversationControls; } & SessionFlavor<ConversationSessionData> & ChatMembersFlavor & Context & { ...; }' is not assignable to type 'ChatMembersContext'. | |
Type 'SessionFlavor<GrammySession> & { conversation: ConversationControls; } & SessionFlavor<ConversationSessionData> & ChatMembersFlavor & Context & { ...; }' is not assignable to type 'Context'. | |
The types of 'update.message' are incompatible between these types. | |
Type '(Message & NonChannel) | undefined' is not assignable to type '(Message & New & NonChannel) | undefined'. | |
Type 'Message & NonChannel' is not assignable to type '(Message & New & NonChannel) | undefined'. | |
Type 'Message & NonChannel' is not assignable to type 'Message & New & NonChannel'. | |
Type 'Message & NonChannel' is not assignable to type 'New'. | |
Types of property 'edit_date' are incompatible. | |
Type 'number | undefined' is not assignable to type 'undefined'. | |
Type 'number' is not assignable to type 'undefined'.deno-ts(2345) | |
```` | |
When i hover `adapter`, i get | |
```sh | |
Argument of type 'Composer<ChatMembersContext>' is not assignable to parameter of type 'Middleware<GrammyContext>'. | |
Type 'Composer<ChatMembersContext>' is not assignable to type 'MiddlewareObj<GrammyContext>'. | |
The types returned by 'middleware()' are incompatible between these types. | |
Type 'MiddlewareFn<ChatMembersContext>' is not assignable to type 'MiddlewareFn<GrammyContext>'. | |
Types of parameters 'ctx' and 'ctx' are incompatible. | |
Type 'GrammyContext' is not assignable to type 'ChatMembersContext'. | |
Type 'SessionFlavor<GrammySession> & { conversation: ConversationControls; } & SessionFlavor<ConversationSessionData> & ChatMembersFlavor & Context & { ...; }' is not assignable to type 'ChatMembersContext'. | |
Type 'SessionFlavor<GrammySession> & { conversation: ConversationControls; } & SessionFlavor<ConversationSessionData> & ChatMembersFlavor & Context & { ...; }' is not assignable to type 'Context'. | |
The types of 'update.message' are incompatible between these types. | |
Type '(Message & NonChannel) | undefined' is not assignable to type '(Message & New & NonChannel) | undefined'. | |
Type 'Message & NonChannel' is not assignable to type '(Message & New & NonChannel) | undefined'. | |
Type 'Message & NonChannel' is not assignable to type 'Message & New & NonChannel'. | |
Type 'Message & NonChannel' is not assignable to type 'New'. | |
Types of property 'edit_date' are incompatible. | |
Type 'number | undefined' is not assignable to type 'undefined'. | |
Type 'number' is not assignable to type 'undefined'.deno-ts(2345) | |
Argument of type 'MemorySessionStorage<ChatMember>' is not assignable to parameter of type 'StorageAdapter<ChatMember>'. | |
The types returned by 'read(...)' are incompatible between these types. | |
Type 'ChatMember | undefined' is not assignable to type 'MaybePromise<ChatMember | undefined>'. | |
Type 'ChatMemberRestricted' is not assignable to type 'MaybePromise<ChatMember | undefined>'. | |
Property 'can_send_media_messages' is missing in type 'import("https://deno.land/x/grammy_types@v3.0.3/manage").ChatMemberRestricted' but required in type 'import("https://esm.sh/v112/@grammyjs/types@2.11.0/manage").ChatMemberRestricted'.deno-ts(2345) | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment