(user: Api.User)
| 1041 | user: Api.User, |
| 1042 | ): Promise<void> { |
| 1043 | const client = await getGlobalClient(); |
| 1044 | if (!client) throw new Error("Telegram 客户端未初始化"); |
| 1045 | |
| 1046 | const inputUser = await client.getInputEntity(user as any); |
| 1047 | |
| 1048 | if (target.isChannel) { |
| 1049 | const inputChannel = await client.getInputEntity(target.entity as any); |
| 1050 | await client.invoke( |
| 1051 | new Api.channels.EditAdmin({ |
| 1052 | channel: inputChannel as any, |