A
A
asamir41022022-01-12 02:34:21
Telegram
asamir4102, 2022-01-12 02:34:21

A createChatInviteLink telegrafjs method doesn't work. there is nothing in the network and in the chat. how to solve?

Chat didn't help. all examples were found in the chat do not work or they cannot be used because there is no documentation.

const SKGroup = bot.telegram.createChatInviteLink("-1001464422293", {member_limit: 1});

const SKGroup = bot.telegram.callApi('createChatInviteLink', {chat_id:fromChatID});

const SKGroup = bot.telegram.callApi('createChatInviteLink', {}, {chat_id:fromChatID});

bot.command('createChatInviteLink', async(ctx)=>{
ctx.telegram.createChatInviteLink(fromChatID, {member_limit: 1})
.then((result) => {console.log(result["invite_link"])} );
})

all these examples don't work.

when executing
const SKGroup = bot.telegram.callApi('
UnhandledPromiseRejectionWarning: Error: 400: Bad Request: chat_id is empty

documentation of this framework does not match reality. many properties are undefined instead of methods. there are no examples on the net with this framework.

if you don’t know how to solve it, what other frameworks would you recommend for telegram bots on nodejs?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question