GetAdminedPublicChannels
---functions--- channels.getAdminedPublicChannels#f8b036af by_location:flags.0?true check_limit:flags.1?true for_personal:flags.2?true = messages.Chats
Returns
| messages.Chats |
Parameters
Example
Replace placeholder values with real data before running.
use ferogram::tl::functions;
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let (client, _) = ferogram::Client::quick_connect(
"my.session",
12345,
"0123456789abcdef0123456789abcdef",
)
.await?;
let result = client
.invoke(
&functions::channels::GetAdminedPublicChannels {
by_location: false,
check_limit: false,
for_personal: false,
},
)
.await?;
println!("{result:?}");
Ok(())
}use ferogram::tl::functions;
use ferogram::update::Update;
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let (client, _) = ferogram::Client::quick_connect(
"my.session",
12345,
"0123456789abcdef0123456789abcdef",
)
.await?;
let mut stream = client.stream_updates();
while let Some(upd) = stream.next().await {
if let Update::NewMessage(_msg) = upd {
let result = client
.invoke(
&functions::channels::GetAdminedPublicChannels {
by_location: false,
check_limit: false,
for_personal: false,
},
)
.await?;
println!("{result:?}");
}
}
Ok(())
}