Initialize a :class:`.TooLargeMediaException` instance. :param actual: The actual size of the uploaded media. :param maximum_size: The maximum size of the uploaded media.
(self, *, actual: int, maximum_size: int)
| 168 | """Indicate exceptions from uploading media that's too large.""" |
| 169 | |
| 170 | def __init__(self, *, actual: int, maximum_size: int) -> None: |
| 171 | """Initialize a :class:`.TooLargeMediaException` instance. |
| 172 | |
| 173 | :param actual: The actual size of the uploaded media. |
| 174 | :param maximum_size: The maximum size of the uploaded media. |
| 175 | |
| 176 | """ |
| 177 | self.maximum_size = maximum_size |
| 178 | self.actual = actual |
| 179 | super().__init__( |
| 180 | f"The media that you uploaded was too large (maximum size is {maximum_size} bytes, uploaded {actual} bytes)" |
| 181 | ) |
| 182 | |
| 183 | |
| 184 | class WebSocketException(ClientException): |