@@ -885,6 +885,8 @@ def messages(self):
885
885
- :class:`Message`
886
886
- :attr:`Client.cached_messages`
887
887
- :meth:`Client.get_message`
888
+ - :attr:`Client.polls`
889
+ - :meth:`Client.get_poll`
888
890
889
891
Note that due to an implicit relationship this also corresponds to the following events:
890
892
@@ -917,6 +919,8 @@ def guild_messages(self):
917
919
- :class:`Message`
918
920
- :attr:`Client.cached_messages` (only for guilds)
919
921
- :meth:`Client.get_message` (only for guilds)
922
+ - :attr:`Client.polls` (only for guilds)
923
+ - :meth:`Client.get_poll` (only for guilds)
920
924
921
925
Note that due to an implicit relationship this also corresponds to the following events:
922
926
@@ -931,6 +935,7 @@ def guild_messages(self):
931
935
- :attr:`Message.embeds`
932
936
- :attr:`Message.attachments`
933
937
- :attr:`Message.components`
938
+ - :attr:`Message.poll`
934
939
935
940
For more information go to the :ref:`message content intent documentation <need_message_content_intent>`.
936
941
"""
@@ -955,6 +960,8 @@ def dm_messages(self):
955
960
- :class:`Message`
956
961
- :attr:`Client.cached_messages` (only for DMs)
957
962
- :meth:`Client.get_message` (only for DMs)
963
+ - :attr:`Client.polls` (only for DMs)
964
+ - :meth:`Client.get_poll` (only for DMs)
958
965
959
966
Note that due to an implicit relationship this also corresponds to the following events:
960
967
@@ -1079,6 +1086,7 @@ def message_content(self):
1079
1086
- :attr:`Message.embeds`
1080
1087
- :attr:`Message.attachments`
1081
1088
- :attr:`Message.components`
1089
+ - :attr:`Message.poll`
1082
1090
1083
1091
These attributes will still be available for messages received from interactions,
1084
1092
the bot's own messages, messages the bot was mentioned in, and DMs.
@@ -1137,6 +1145,66 @@ def auto_moderation_execution(self):
1137
1145
"""
1138
1146
return 1 << 21
1139
1147
1148
+ @flag_value
1149
+ def guild_polls (self ):
1150
+ """:class:`bool`: Whether poll-related events in guilds are enabled.
1151
+
1152
+ See also :attr:`dm_polls` for DMs or :attr:`polls` for both.
1153
+
1154
+ This corresponds to the following events:
1155
+
1156
+ - :func:`on_poll_vote_add` (only for guilds)
1157
+ - :func:`on_poll_vote_remove` (only for guilds)
1158
+ - :func:`on_raw_poll_vote_add` (only for guilds)
1159
+ - :func:`on_raw_poll_vote_remove` (only for guilds)
1160
+
1161
+ This also corresponds to the following attributes and classes in terms of cache:
1162
+
1163
+ - :attr:`PollAnswer.count` (only for guild polls)
1164
+ - :attr:`PollResults.answer_counts` (only for guild polls)
1165
+ """
1166
+ return 1 << 24
1167
+
1168
+ @flag_value
1169
+ def dm_polls (self ):
1170
+ """:class:`bool`: Whether poll-related events in direct messages are enabled.
1171
+
1172
+ See also :attr:`guild_polls` for guilds or :attr:`polls` for both.
1173
+
1174
+ This corresponds to the following events:
1175
+
1176
+ - :func:`on_poll_vote_add` (only for DMs)
1177
+ - :func:`on_poll_vote_remove` (only for DMs)
1178
+ - :func:`on_raw_poll_vote_add` (only for DMs)
1179
+ - :func:`on_raw_poll_vote_remove` (only for DMs)
1180
+
1181
+ This also corresponds to the following attributes and classes in terms of cache:
1182
+
1183
+ - :attr:`PollAnswer.count` (only for DM polls)
1184
+ - :attr:`PollResults.answer_counts` (only for DM polls)
1185
+ """
1186
+ return 1 << 25
1187
+
1188
+ @alias_flag_value
1189
+ def polls (self ):
1190
+ """:class:`bool`: Whether poll-related events in guilds and direct messages are enabled.
1191
+
1192
+ This is a shortcut to set or get both :attr:`guild_polls` and :attr:`dm_polls`.
1193
+
1194
+ This corresponds to the following events:
1195
+
1196
+ - :func:`on_poll_vote_add` (both guilds and DMs)
1197
+ - :func:`on_poll_vote_remove` (both guilds and DMs)
1198
+ - :func:`on_raw_poll_vote_add` (both guilds and DMs)
1199
+ - :func:`on_raw_poll_vote_remove` (both guilds and DMs)
1200
+
1201
+ This also corresponds to the following attributes and classes in terms of cache:
1202
+
1203
+ - :attr:`PollAnswer.count` (both guild and DM polls)
1204
+ - :attr:`PollResults.answer_counts` (both guild and DM polls)
1205
+ """
1206
+ return (1 << 24 ) | (1 << 25 )
1207
+
1140
1208
1141
1209
@fill_with_flags ()
1142
1210
class MemberCacheFlags (BaseFlags ):
0 commit comments