Skip to content

Commit

Permalink
fix: Add comment to explain how to use mentions (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
Era-Dorta authored Dec 20, 2024
1 parent be4a8f0 commit cdde4e3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
3 changes: 2 additions & 1 deletion signalbot/api.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import aiohttp
import websockets
from typing import Any


class SignalAPI:
Expand Down Expand Up @@ -33,7 +34,7 @@ async def send(
quote_mentions: list = None,
quote_message: str = None,
quote_timestamp: str = None,
mentions: list = None,
mentions: list[dict[str, Any]] | None = None,
text_mode: str = None,
) -> aiohttp.ClientResponse:
uri = self._send_rest_uri()
Expand Down
6 changes: 4 additions & 2 deletions signalbot/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from apscheduler.schedulers.asyncio import AsyncIOScheduler
import logging
import traceback
from typing import Optional, Union, List, Callable
from typing import Optional, Union, List, Callable, Any
import re
import uuid

Expand Down Expand Up @@ -181,7 +181,9 @@ async def send(
quote_mentions: list = None,
quote_message: str = None,
quote_timestamp: str = None,
mentions: list = None,
mentions: (
list[dict[str, Any]] | None
) = None, # [{ "author": "uuid" , "start": 0, "length": 1 }]
text_mode: str = None,
listen: bool = False,
) -> int:
Expand Down
5 changes: 4 additions & 1 deletion signalbot/context.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# from .bot import Signalbot # TODO: figure out how to enable this for typing
from .message import Message
from typing import Any


class Context:
Expand All @@ -26,7 +27,9 @@ async def reply(
self,
text: str,
base64_attachments: list = None,
mentions: list = None,
mentions: (
list[dict[str, Any]] | None
) = None, # [{ "author": "uuid" , "start": 0, "length": 1 }]
text_mode: str = None,
):
return await self.bot.send(
Expand Down

0 comments on commit cdde4e3

Please sign in to comment.