mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-05 09:26:10 +00:00
Add support for voice messages
Co-authored-by: Danny <1695103+Rapptz@users.noreply.github.com>
This commit is contained in:
@ -56,7 +56,7 @@ from typing import (
|
||||
TYPE_CHECKING,
|
||||
)
|
||||
import unicodedata
|
||||
from base64 import b64encode
|
||||
from base64 import b64encode, b64decode
|
||||
from bisect import bisect_left
|
||||
import datetime
|
||||
import functools
|
||||
@ -628,6 +628,10 @@ def _bytes_to_base64_data(data: bytes) -> str:
|
||||
return fmt.format(mime=mime, data=b64)
|
||||
|
||||
|
||||
def _base64_to_bytes(data: str) -> bytes:
|
||||
return b64decode(data.encode('ascii'))
|
||||
|
||||
|
||||
def _is_submodule(parent: str, child: str) -> bool:
|
||||
return parent == child or child.startswith(parent + '.')
|
||||
|
||||
|
Reference in New Issue
Block a user