Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions techsupport_bot/tests/helpers/channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
This is a file to store the fake disord.TextChannel objection
"""

from typing import AsyncGenerator


class MockChannel:
"""
Expand All @@ -16,15 +18,15 @@ class MockChannel:
def __init__(self, history=None):
self.message_history = history

async def history(self, limit):
async def history(self, limit) -> AsyncGenerator[str, None]:
"""Replication of the async history method
As history is not expected to be massive, this just yields every message

Args:
limit (int): The represents a limit. This is currently not used

Yields:
str : This represents a single message in the history
AsyncGenerator[str, None, None] : This represents a single message in the history
"""
if limit == 0:
return
Expand Down