You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I want to add telegram bot into channel/group whenever requested. I've tried almost all the different methods using which I can add user to the chat/group/channel but still not able to figure it out. hoping to get response here.
The function method I mostly got after looking in google was InviteToChannel but not sure how to pass bot id so that it doesn't give me error RPCError: 400: USER_BOT (caused by channels.InviteToChannel)
Hello, I want to add telegram bot into channel/group whenever requested. I've tried almost all the different methods using which I can add user to the chat/group/channel but still not able to figure it out. hoping to get response here.
The function method I mostly got after looking in google was InviteToChannel but not sure how to pass bot id so that it doesn't give me error RPCError: 400: USER_BOT (caused by channels.InviteToChannel)
Code :
const addBott = await client.invoke(
new Api.channels.InviteToChannel({
channel: -1001923158756,
users: ["test_bot"],
})
);
const addBot = await client.invoke(
new Api.channels.InviteToChannel({
channel: -1001923168756,
users: [new Api.InputUser({ user_id: BigInt("6325799628") })],
})
);
PS: I've modified the values. Thanks!