(base64_string)
| 32 | return base64_string |
| 33 | |
| 34 | async def decode(base64_string): |
| 35 | base64_string = base64_string.strip("=") # links generated before this commit will be having = sign, hence striping them to handle padding errors. |
| 36 | base64_bytes = (base64_string + "=" * (-len(base64_string) % 4)).encode("ascii") |
| 37 | string_bytes = base64.urlsafe_b64decode(base64_bytes) |
| 38 | string = string_bytes.decode("ascii") |
| 39 | return string |
| 40 | |
| 41 | async def get_messages(client, message_ids): |
| 42 | messages = [] |