diff --git a/core/clients.py b/core/clients.py index c606288646..e80225d9e9 100644 --- a/core/clients.py +++ b/core/clients.py @@ -766,13 +766,14 @@ async def get_user_info(self) -> Optional[dict]: } async def update_title(self, title: str, channel_id: Union[str, int]): - await self.bot.db.logs.find_one_and_update({"channel_id": str(channel_id)}, {"$set": {"title": title}}) + await self.bot.db.logs.find_one_and_update( + {"channel_id": str(channel_id)}, {"$set": {"title": title}} + ) async def update_nsfw(self, nsfw: bool, channel_id: Union[str, int]): await self.bot.db.logs.find_one_and_update({"channel_id": str(channel_id)}, {"$set": {"nsfw": nsfw}}) - class PluginDatabaseClient: def __init__(self, bot): self.bot = bot diff --git a/core/migrations.py b/core/migrations.py index c51521abab..9ffe467197 100644 --- a/core/migrations.py +++ b/core/migrations.py @@ -1,6 +1,6 @@ import datetime import re -from typing import Optional, List +from typing import List, Optional from core import blocklist from core.models import getLogger diff --git a/core/thread.py b/core/thread.py index ef25888b28..22162d86dc 100644 --- a/core/thread.py +++ b/core/thread.py @@ -1218,16 +1218,10 @@ async def set_title(self, title: str, channel_id: int) -> None: ids = ",".join(str(i.id) for i in self._other_recipients) topic += f"\nOther Recipients: {ids}" - await asyncio.gather( - self.channel.edit(topic=topic), - self.bot.api.update_title(title, channel_id) - ) + await asyncio.gather(self.channel.edit(topic=topic), self.bot.api.update_title(title, channel_id)) async def set_nsfw_status(self, nsfw: bool) -> None: - await asyncio.gather( - self.channel.edit(nsfw=nsfw), - self.bot.api.update_nsfw(nsfw, self.channel.id) - ) + await asyncio.gather(self.channel.edit(nsfw=nsfw), self.bot.api.update_nsfw(nsfw, self.channel.id)) async def _update_users_genesis(self): genesis_message = await self.get_genesis_message()