diff options
-rw-r--r-- | bot/exts/utils/snekbox/_io.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bot/exts/utils/snekbox/_io.py b/bot/exts/utils/snekbox/_io.py index 8f704705f..404681936 100644 --- a/bot/exts/utils/snekbox/_io.py +++ b/bot/exts/utils/snekbox/_io.py @@ -66,6 +66,11 @@ class FileAttachment: """Return the file suffix.""" return Path(self.path).suffix + @property + def name(self) -> str: + """Return the file name.""" + return Path(self.path).name + @classmethod def from_dict(cls, data: dict, size_limit: int = FILE_SIZE_LIMIT) -> FileAttachment: """Create a FileAttachment from a dict response.""" |