Closed vhforbes closed 11 months ago
I'm trying to get the number of members using getChatMembersCount
I'm getting a typeError saying that "bot.getChatMembersCount is not a function"
This is my first issue on github, overall I'm really enjoying the bot, if it is my mistake, I would be really glad if someone can point it out!
Really appreciate.
The function is called getChatMemberCount
, not getChatMembersCount
.
Ok, the function works now! But after reviewing the @types of the package, it explicitly says:
getChatMembersCount(chatId: TelegramBot.ChatId): Promise<number>;
So typescript throws a error because the typing is wrong when using it in the singular: getChatMemberCount
.
Yep, we talk about this some days ago in the telegram group, the method is getChatMemberCount
, not plural. But someone that do the types in the Types repo put the name wrong
Ok, the function works now! But after reviewing the @types of the package, it explicitly says:
getChatMembersCount(chatId: TelegramBot.ChatId): Promise<number>;
So typescript throws a error because the typing is wrong when using it in the singular:
getChatMemberCount
.
https://github.com/DefinitelyTyped/DefinitelyTyped/pull/64271
I'm trying to get the number of members using getChatMembersCount
I'm getting a typeError saying that "bot.getChatMembersCount is not a function"
This is my first issue on github, overall I'm really enjoying the bot, if it is my mistake, I would be really glad if someone can point it out!
Really appreciate.