Skip to content

Commit

Permalink
fix loop throw error
Browse files Browse the repository at this point in the history
  • Loading branch information
a3510377 committed Jan 30, 2024
1 parent 8026148 commit aec4cb1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions plugins/discord/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@


class Bot(commands.Bot):
__version__ = "1.3.0"

def __init__(self, plugin: Plugin, loop: AbstractEventLoop | None = None):
super().__init__(
command_prefix=plugin.config.get("prefix"),
Expand All @@ -44,13 +46,12 @@ def __init__(self, plugin: Plugin, loop: AbstractEventLoop | None = None):
help_command=None,
)

self._uptime = None
self.plugin = plugin
self.log = plugin.log
self.console = rich.get_console()
self.config = plugin.config
self.server = plugin.server
self._uptime = None
self.__version__ = "1.3.0"
self.log.info(
f"[red]py-cord version: [/red][cyan]{discord.__version__}[/cyan]",
extra=dict(markup=True),
Expand Down
2 changes: 1 addition & 1 deletion server/core/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def format(self, record: LogRecord):
record = copy.deepcopy(record)
record.msg = Text.from_markup(record.msg)
except Exception as e: # fix: aiohttp throw errors
log.debug(e)
print(e)

return (self.formatter or Formatter()).format(record)

Expand Down

0 comments on commit aec4cb1

Please sign in to comment.