mtproto-core
mtproto-core copied to clipboard
error_code: 400, error_message: 'CHANNEL_INVALID'
Describe the bug Im forwarding from a channel to my channel, it worked great until a few weeks ago so I checked and saw that the access_hash: of the groups i forward from has changed, so i replaced the old access_hash with their new access_hash but now I get this error Keep in mind i changed the proxy and api hashes to random numbers for the purpose of this post.
(node:9163) UnhandledPromiseRejectionWarning: #<Object> (node:9163) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag
--unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 6) messages.getHistory error: { _: 'mt_rpc_error', error_code: 400, error_message: 'CHANNEL_INVALID'
Code example `const path = require('path'); const MTProto = require('@mtproto/core'); const readline = require('readline'); const fs = require('fs'); const puppeteer = require('puppeteer-extra'); const r = require('request'); const request = r.defaults({ proxy: "http://random:random!@random" });
const api_id = 11111; const api_hash = '11111111';
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
const TopClient = require('node-taobao-topclient').default;
const client = new TopClient({ appkey: '3333', appsecret: '3333', });
const channels = [{ _: 'inputPeerChannel', channel_id: 56456456, access_hash: 654654654645654n }, { _: 'inputPeerChannel', channel_id: 546546546, access_hash: 546456546456455n } /, { _: 'inputPeerChannel', channel_id: 67567657, access_hash: 7657567657657n }/ ];
const oilChannel = { _: 'inputPeerChannel', channel_id: 56565665, access_hash: 56756765765756n }`
Expected behavior
Forward from their channel to mine and change some texts, links.
It worked great untill couple of weeks and i cant find the problem