Commit 78d50b6
feat: Add base iterators & context managers + helpers (#1057)
* fix: small but annoying bug
* feat: Add channel history async iterator
* docs: change docstring
* feat: add `get_channel_history` utility method
* fix: add client safeguard
* feat: add maximum amount to get
* refactor/feat: Create an ABC and update the channel history iterator accordingly
* feat/refactor: add checks and move files
* docs: fix strings
* chore: remove print
* fix: add check to channel history iter
* fix: add check to channel history iter
* feat: make the guild members iterator
* fix: type annotation
* fix: correct id key
* fix: make `maximum` `inf`
* fix: math is hard...
* feat: Add normal `BaseIterator`
* chore: make comment
* refactor: change import paths to relative
* fix: path
* feat: add context managers
* feat: add typing context manager
* feat: add new attributes and `get_guild_members` utility method
* fix: speling
(typo intended)
* fix: import context managers
* Update utils.py
* ci: correct from checks.
* Update utils.py
* Update base_iterators.py
* ci: correct from checks.
* Update base_iterators.py
* Update channel.py
* Update guild.py
* Update guild.py
* ci: correct from checks.
* Update channel.py
* ci: correct from checks.
* Update base_iterators.py
* Update base_context_managers.py
* ci: correct from checks.
* Update base_iterators.py
* ci: correct from checks.
* Update base_iterators.py
* Update channel.py
* Update guild.py
* Update base_context_managers.py
* Update channel.py
* Update base_context_managers.py
* ci: correct from checks.
* Update channel.py
* Update base_context_managers.py
* Update channel.py
* ci: correct from checks.
* Update base_context_managers.py
* ci: correct from checks.
* Update base_context_managers.py
* ci: correct from checks.
* Update base_context_managers.py
* Update base_iterators.py
* ci: correct from checks.
* Update channel.py
* ci: correct from checks.
* Update guild.py
* Update guild.py
* ci: correct from checks.
* Update utils.py
* ci: correct from checks.
* Update base_iterators.py
* Update utils.py
* ci: correct from checks.
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>1 parent baecb46 commit 78d50b6
File tree
7 files changed
+572
-4
lines changed- interactions
- api
- gateway
- models
- utils
- abc
7 files changed
+572
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
921 | 921 | | |
922 | 922 | | |
923 | 923 | | |
| 924 | + | |
924 | 925 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
4 | 8 | | |
| 9 | + | |
| 10 | + | |
5 | 11 | | |
6 | 12 | | |
7 | 13 | | |
| |||
18 | 24 | | |
19 | 25 | | |
20 | 26 | | |
| 27 | + | |
21 | 28 | | |
22 | 29 | | |
23 | 30 | | |
| |||
28 | 35 | | |
29 | 36 | | |
30 | 37 | | |
| 38 | + | |
31 | 39 | | |
32 | 40 | | |
33 | 41 | | |
| |||
95 | 103 | | |
96 | 104 | | |
97 | 105 | | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
98 | 281 | | |
99 | 282 | | |
100 | 283 | | |
| |||
180 | 363 | | |
181 | 364 | | |
182 | 365 | | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
183 | 376 | | |
184 | 377 | | |
185 | 378 | | |
| |||
190 | 383 | | |
191 | 384 | | |
192 | 385 | | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
193 | 413 | | |
194 | 414 | | |
195 | 415 | | |
| |||
1122 | 1342 | | |
1123 | 1343 | | |
1124 | 1344 | | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
1125 | 1349 | | |
1126 | 1350 | | |
1127 | 1351 | | |
| |||
0 commit comments