2323from __future__ import annotations
2424
2525import datetime
26- from typing import List , Optional , Sequence , overload
26+ from typing import List , Literal , Optional , Sequence , overload
2727
2828import aiohttp
2929
@@ -174,7 +174,15 @@ async def delete_pastes(self, paste_ids: List[str], /) -> None:
174174 """
175175 await self .http .delete_pastes (paste_ids = paste_ids )
176176
177- async def get_paste (self , paste_id : str , * , password : Optional [str ] = None ) -> Paste :
177+ @overload
178+ async def get_paste (self , paste_id : str , * , password : Optional [str ] = ..., raw : Literal [False ]) -> Paste :
179+ ...
180+
181+ @overload
182+ async def get_paste (self , paste_id : str , * , password : Optional [str ] = ..., raw : Literal [True ]) -> list [str ]:
183+ ...
184+
185+ async def get_paste (self , paste_id : str , * , password : Optional [str ] = None , raw : bool = False ) -> Paste | list [str ]:
178186 """|coro|
179187
180188 Fetch a paste.
@@ -187,6 +195,8 @@ async def get_paste(self, paste_id: str, *, password: Optional[str] = None) -> P
187195 The password of the paste, if any.
188196 """
189197 data = await self .http .get_paste (paste_id = paste_id , password = password )
198+ if raw :
199+ return [item ["content" ] for item in data ["files" ]]
190200 return Paste .from_data (data )
191201
192202 @require_authentication
0 commit comments