Skip to content

Commit

Permalink
refactor: bucket subsuction
Browse files Browse the repository at this point in the history
Co-authored-by: Emre Terzioglu <[email protected]>
Signed-off-by: VincentRPS <[email protected]>
  • Loading branch information
VincentRPS and EmmmaTech authored Aug 3, 2023
1 parent 806939e commit 1296843
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions discord/rate_limiting.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,12 +373,11 @@ async def get_or_create(self, id: str) -> Bucket:

buc = await self.get(id)

if buc:
return buc
else:
if not buc:
buc = Bucket()
await self.append(id, buc)
return buc

return buc

async def temp_bucket(self, id: str) -> DynamicBucket | None:
"""Fetch a temporary bucket.
Expand Down

0 comments on commit 1296843

Please sign in to comment.