MCPcopy Index your code
hub / github.com/CodeXBotz/File-Sharing-Bot / decode

Function decode

helper_func.py:34–39  ·  view source on GitHub ↗
(base64_string)

Source from the content-addressed store, hash-verified

32 return base64_string
33
34async 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
41async def get_messages(client, message_ids):
42 messages = []

Callers 1

start_commandFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected