Open ljs19923 opened 2 years ago
Are you sure you're trying this code with a bot not a user?. Make sure you're using the correct bot to do this. (the bot needs to be in the channel that the user is in). Make sure that the ID is correct.
that's generally all you need to take care of if you're using a bot.
Hi guys,
Im trying to kick a user from a channel with a bot admin of the channel. Everything was good before ( 1 month ago ) but I know I got this error :
Could not find the input entity for {"userId":"5522131067","className":"PeerUser"}. Please read https://docs.telethon.dev/en/latest/concepts/entities.html to find out more details.
var tgId = "5522131067" This is my code : await client.invoke( new Api.channels.EditBanned({ channel: "-1001697705555", participant: tgId, bannedRights: new Api.ChatBannedRights({ viewMessages: true, }), }) );
await client.invoke( new Api.channels.EditBanned({ channel: "-1001697705555", participant: tgId, bannedRights: new Api.ChatBannedRights({ viewMessages: false, }), }) );
If you have any suggestions. Again this code worked 1 month ago