MadelineProtoDocs/docs/API_docs/constructors/stats.megagroupStats.md
2024-05-01 14:53:46 +02:00

3.3 KiB

title description nav_exclude image redirect_from
stats.megagroupStats Supergroup statistics true https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png /API_docs/constructors/stats_megagroupStats.html

Constructor: stats.megagroupStats

Back to constructors index

Supergroup statistics

Attributes:

Name Type Required Description
period StatsDateRangeDays Yes Period in consideration
members StatsAbsValueAndPrev Yes Member count change for period in consideration
messages StatsAbsValueAndPrev Yes Message number change for period in consideration
viewers StatsAbsValueAndPrev Yes Number of users that viewed messages, for range in consideration
posters StatsAbsValueAndPrev Yes Number of users that posted messages, for range in consideration
growth_graph StatsGraph Yes Supergroup growth graph (absolute subscriber count)
members_graph StatsGraph Yes Members growth (relative subscriber count)
new_members_by_source_graph StatsGraph Yes New members by source graph
languages_graph StatsGraph Yes Subscriber language graph (pie chart)
messages_graph StatsGraph Yes Message activity graph (stacked bar graph, message type)
actions_graph StatsGraph Yes Group activity graph (deleted, modified messages, blocked users)
top_hours_graph StatsGraph Yes Activity per hour graph (absolute)
weekdays_graph StatsGraph Yes Activity per day of week graph (absolute)
top_posters Array of StatsGroupTopPoster Yes Info about most active group members
top_admins Array of StatsGroupTopAdmin Yes Info about most active group admins
top_inviters Array of StatsGroupTopInviter Yes Info about most active group inviters
users Array of User Yes Info about users mentioned in statistics

Type: stats.MegagroupStats

Example:

$stats_megagroupStats = ['_' => 'stats.megagroupStats', 'period' => StatsDateRangeDays, 'members' => StatsAbsValueAndPrev, 'messages' => StatsAbsValueAndPrev, 'viewers' => StatsAbsValueAndPrev, 'posters' => StatsAbsValueAndPrev, 'growth_graph' => StatsGraph, 'members_graph' => StatsGraph, 'new_members_by_source_graph' => StatsGraph, 'languages_graph' => StatsGraph, 'messages_graph' => StatsGraph, 'actions_graph' => StatsGraph, 'top_hours_graph' => StatsGraph, 'weekdays_graph' => StatsGraph, 'top_posters' => [StatsGroupTopPoster, StatsGroupTopPoster], 'top_admins' => [StatsGroupTopAdmin, StatsGroupTopAdmin], 'top_inviters' => [StatsGroupTopInviter, StatsGroupTopInviter], 'users' => [User, User]];