Skip to content

Commit

Permalink
refactor(mentionable_tree.py): replace logging with loguru for improv…
Browse files Browse the repository at this point in the history
…ed logging capabilities
  • Loading branch information
kzndotsh committed Nov 19, 2024
1 parent 3685978 commit 4e6ed82
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tux/mentionable_tree.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
# fmt: off
import contextlib
from collections.abc import Generator
from logging import getLogger
from typing import Any

import discord
from discord import app_commands
from discord.ext import commands
from loguru import logger

__all__ = ("MentionableTree",)
_log = getLogger(__name__)

class MentionableTree(app_commands.CommandTree):
def __init__(self, *args: Any, **kwargs: Any):
Expand Down Expand Up @@ -134,4 +132,4 @@ async def walk_mentions(self, *, guild: discord.abc.Snowflake | None = None):
if mention:
yield command, mention
else:
_log.warning("Could not find a mention for command %s in the API. Are you out of sync?", command)
logger.warning("Could not find a mention for command %s in the API. Are you out of sync?", command)

0 comments on commit 4e6ed82

Please sign in to comment.