Skip to content
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
showierdata9978 committed Nov 6, 2023
1 parent fcc6843 commit d3079cc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 13 deletions.
15 changes: 5 additions & 10 deletions MeowerBot/context.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
from datetime import datetime

from typing import TYPE_CHECKING

if TYPE_CHECKING:
from .bot import Bot

from .data.api.chats import ChatGroup
from .data.api.user import User as RawUser
from .api.shared import api_resp
Expand All @@ -13,9 +8,9 @@


class PartialChat:
def __init__(self, id, bot: "Bot"):
def __init__(self, id, bot):
self.id = id
self.bot: "Bot" = bot
self.bot = bot

async def send_msg(self, message) -> Optional["Post"]:
data, status = await self.bot.api.send_post(self.id, message)
Expand All @@ -34,7 +29,7 @@ async def fetch(self) -> Optional["Chat"]:


class Chat(PartialChat):
def __init__(self, data: ChatGroup, bot: "Bot"):
def __init__(self, data: ChatGroup, bot):
super().__init__(data._id, bot)

self.created = data.created
Expand All @@ -49,7 +44,7 @@ def __init__(self, data: ChatGroup, bot: "Bot"):


class PartialUser:
def __init__(self, username: str, bot: "Bot"):
def __init__(self, username: str, bot):
self.username: str = username
self.bot = bot

Expand Down Expand Up @@ -81,7 +76,7 @@ def __init__(self, username, bot, data: RawUser):


class Post:
def __init__(self, bot: "Bot", _raw: dict, chat):
def __init__(self, bot, _raw: dict, chat):
self.bot = bot
self._raw = _raw
self.user: PartialUser | User = PartialUser(self._raw["u"], bot)
Expand Down
4 changes: 2 additions & 2 deletions docs/source/MeowerBot.Bot.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
MeowerBot.Bot module
MeowerBot.bot module
====================

.. automodule:: MeowerBot.Bot
.. automodule:: MeowerBot.bot
:members:
:undoc-members:
:show-inheritance:
2 changes: 1 addition & 1 deletion docs/source/MeowerBot.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Submodules
.. toctree::
:maxdepth: 4

MeowerBot.Bot
MeowerBot.bot
MeowerBot.cog
MeowerBot.command
MeowerBot.context
Expand Down

0 comments on commit d3079cc

Please sign in to comment.