We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I having some problems while trying to report the message
async reportMessage(channelId: string, messageId: number, reason: ReportReason, comment?: string) { let reasonApi: Api.TypeReportReason; switch (reason) { case ReportReason.SPAM: reasonApi = new Api.InputReportReasonSpam(); break; case ReportReason.VIOLENCE: reasonApi = new Api.InputReportReasonViolence(); break; case ReportReason.PORNOGRAPHY: reasonApi = new Api.InputReportReasonPornography(); break; case ReportReason.COPYRIGHT: reasonApi = new Api.InputReportReasonCopyright(); break; case ReportReason.CHILD_ABUSE: reasonApi = new Api.InputReportReasonChildAbuse(); break; case ReportReason.FAKE: reasonApi = new Api.InputReportReasonFake(); break; case ReportReason.OTHER: default: reasonApi = new Api.InputReportReasonOther(); break; } return this.handleCall( (client) => client.invoke( new Api.messages.Report({ peer: channelId, id: [messageId], option: reasonApi.getBytes(), message: comment || "", }) ), { name: "reportMessage" } ); }
I have an error:
Telegram returned error: RPCError: 400: OPTION_INVALID (caused by messages.Report)
According to documentation I should provide reason field instead of option. But in this case I see in my browser something like this:
Telegram returned error: TypeError: Cannot read properties of undefined (reading 'constructor')
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I having some problems while trying to report the message
I have an error:
According to documentation I should provide reason field instead of option. But in this case I see in my browser something like this:
The text was updated successfully, but these errors were encountered: