diff options
| -rw-r--r-- | snekbox/snekio.py | 4 | 
1 files changed, 2 insertions, 2 deletions
diff --git a/snekbox/snekio.py b/snekbox/snekio.py index 9321eb2..2d2de6e 100644 --- a/snekbox/snekio.py +++ b/snekbox/snekio.py @@ -40,7 +40,7 @@ class IllegalPathError(ParsingError):      """Raised when an attachment has an illegal path.""" -@dataclass +@dataclass(frozen=True)  class FileAttachment:      """A file attachment.""" @@ -79,7 +79,7 @@ class FileAttachment:          file.write_bytes(self.content)      @cached_property -    def json(self) -> dict[str, str]: +    def as_dict(self) -> dict[str, str]:          """Convert the attachment to a dict."""          content = b64encode(self.content).decode("ascii")          return {  |