使用 Telegram TL 获取频道列表

编程入门 行业动态 更新时间:2024-10-22 21:32:13
本文介绍了使用 Telegram TL 获取频道列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我需要用户已加入的所有频道的列表.我找到了以下功能:

I need a list of all channels that user has already joined. I found the below function:

channels.getChannels#0a7f6bbb id:Vector<InputChannel> = messages.Chats

但我无法理解id: Vector".如果是频道ID,是不是只返回单个频道的信息?!另一方面,它的返回类型是messages.Chats".我真的不明白.

But I couldn't understand "id: Vector<InputChannel>". If it's ID of a channel, is that mean it only return information of a single channel?! On the other hand, its return type is "messages.Chats". I really don't get it.

推荐答案

使用 messages.Dialogs 我们将拥有所有对话框(组、频道和用户):

With messages.Dialogs we will have all dialog (Groups, Channel, and Users):

messages.getDialogs#191ba9c5 exclude_pinned:true offset_date:int offset_id:int offset_peer:InputPeer limit:int = messages.Dialogs;

这将返回 messages.dialogsSlice 对象:

This will return messages.dialogsSlice object:

messages.dialogsSlice#71e094f3 count:int dialogs:Vector<Dialog> messages:Vector<Message> chats:Vector<Chat> users:Vector<User> = messages.Dialogs;

这里的聊天"是一个包含群组和频道的列表(向量).

Here "chats" is a list (vector) that contain groups and channels.

这篇关于使用 Telegram TL 获取频道列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-05-01 07:11:42,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1405900.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:列表   频道   Telegram   TL

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!