Skip to content

Commit

Permalink
Refactor code for better readability and maintainability
Browse files Browse the repository at this point in the history
  • Loading branch information
rtk-rnjn committed Jun 27, 2024
1 parent 17d030e commit 1e99515
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions cogs/nasa/nasa.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ def __init__(self, bot: Parrot) -> None:
self._cache: dict = {}
self._api_params = {"api_key": NASA_KEY}

self.apod_loop.start()

@property
def display_emoji(self) -> discord.PartialEmoji:
return discord.PartialEmoji(name="nasa", id=892425662864982056)
Expand Down
4 changes: 2 additions & 2 deletions events/on_msg.py
Original file line number Diff line number Diff line change
Expand Up @@ -662,8 +662,8 @@ async def _on_message_passive_afk_user_message(self, message: discord.Message):
if message.guild is None:
return

if message.author.bot and message.interaction is not None:
interacted_user = message.interaction.user
if message.author.bot and message.interaction_metadata is not None:
interacted_user = message.interaction_metadata.user
else:
interacted_user = message.author

Expand Down

0 comments on commit 1e99515

Please sign in to comment.