Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
raidensakura committed Aug 18, 2023
1 parent c4a09be commit d6d33f0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
5 changes: 3 additions & 2 deletions core/clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion core/migrations.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
10 changes: 2 additions & 8 deletions core/thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit d6d33f0

Please sign in to comment.