Skip to content

Commit

Permalink
hotfix: relative imports not resolving (1?)
Browse files Browse the repository at this point in the history
  • Loading branch information
seven7ty committed Apr 12, 2024
1 parent 7e1be4d commit 08f024a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
1 change: 0 additions & 1 deletion lib/structs/discord/components/embed_pages_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ def __init__(self, pages: 'EmbedPages'):
self.context: 'GitBotContext' = pages.context
self.pages: 'EmbedPages' = pages


@discord.ui.button(custom_id='first', emoji='⏮', style=discord.ButtonStyle.grey)
async def to_first_page(self, interaction: discord.Interaction, _):
await interaction.response.defer()
Expand Down
9 changes: 5 additions & 4 deletions lib/structs/discord/embed.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

import discord
import asyncio
from typing import Callable, Optional, Awaitable, Any, TYPE_CHECKING
from lib.utils.regex import MARKDOWN_EMOJI_RE
from lib.structs.discord.components import ConfirmationView
from typing import Callable, Optional, Awaitable, Any, TYPE_CHECKING
from lib.structs.proxies.dict_proxy import DictProxy
from lib.structs.enums import GitBotCommandState

Expand Down Expand Up @@ -106,7 +106,8 @@ async def edit_with_state(self, ctx: 'GitBotContext', state: int | GitBotCommand
ctx.l.generic.failure,
_embed)
case GitBotCommandState.TIMEOUT:
self._input_with_timeout_update(ctx.bot.mgr.c.discord.yellow, ':warning:', ctx.l.generic.inactive, _embed)
self._input_with_timeout_update(ctx.bot.mgr.c.discord.yellow, ':warning:', ctx.l.generic.inactive,
_embed)
await ctx.message.edit(embed=_embed)

def _input_with_timeout_update(self,
Expand Down Expand Up @@ -175,8 +176,8 @@ async def input_with_timeout(self,
state: GitBotCommandState = (callback_result if not isinstance(callback_result, tuple)
else callback_result[0])
return_args = None if not isinstance(callback_result, tuple) else callback_result[1:]
if antispam >= antispam_threshold-1 and with_antispam:
state: GitBotCommandState = GitBotCommandState.FAILURE
if antispam >= antispam_threshold - 1 and with_antispam:
state: GitBotCommandState = GitBotCommandState.FAILURE
if state is GitBotCommandState.CONTINUE:
antispam += 1
continue
Expand Down
2 changes: 1 addition & 1 deletion lib/structs/discord/pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from lib.structs.discord.context import GitBotContext
from lib.structs.discord.bot import GitBot
from lib.structs.discord.embed import GitBotEmbed
from structs.enums import GitBotCommandState
from lib.structs.enums import GitBotCommandState
from lib.structs.discord.components import EmbedPagesControlView


Expand Down

0 comments on commit 08f024a

Please sign in to comment.