Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Selyss committed Dec 17, 2023
1 parent 1040487 commit 0b012cb
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions cogs/inquiry.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,15 @@ def __init__(self) -> None:
custom_id="ticket:inquiry",
)
async def open_inquiry(self, btn: nextcord.ui.Button, inter: nextcord.Interaction):
inter.message.author = inter.user
bucket = self.cooldown.get_bucket(inter.message)
retry = bucket.update_rate_limit()
if retry:
return await inter.response.send_message(
f"Slow down! Try again in {int(retry // 3600)}h.", ephemeral=True
)
await inter.response.send_modal(QuestionForm())
if isinstance(inter.message, nextcord.Message):
inter.message.author = inter.user
bucket = self.cooldown.get_bucket(inter.message)
retry = bucket.update_rate_limit()
if retry:
return await inter.response.send_message(
f"Slow down! Try again in {int(retry // 3600)}h.", ephemeral=True
)
await inter.response.send_modal(QuestionForm())

@nextcord.ui.button(
label="📢 Advertisement",
Expand Down

0 comments on commit 0b012cb

Please sign in to comment.