From 3aae2c5f2b17a5e43a68b7ebec25c31c28d48dd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Filip?= Date: Sat, 13 Jan 2024 10:36:26 +0100 Subject: [PATCH] Fix styling --- example/commands/styles.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/example/commands/styles.py b/example/commands/styles.py index 58bd2cb..05ec17b 100644 --- a/example/commands/styles.py +++ b/example/commands/styles.py @@ -1,19 +1,23 @@ import os from signalbot import SignalBot, Command, Context + class StylesCommand(Command): async def handle(self, c: Context): if c.message.text == "Styles": await c.send("**Bold style**", text_mode="styled") await c.send("*Italic style*", text_mode="styled") await c.send("~Strikethrough style~", text_mode="styled") - await c.send("||Spoiler style||", text_mode="styled") + await c.send("||Spoiler style||", text_mode="styled") await c.send("`Monospaced style`", text_mode="styled") + if __name__ == "__main__": - bot = SignalBot({ - "signal_service": os.environ["SIGNAL_SERVICE"], - "phone_number": os.environ["PHONE_NUMBER"], - }) - bot.register(StylesCommand()) # all contacts and groups + bot = SignalBot( + { + "signal_service": os.environ["SIGNAL_SERVICE"], + "phone_number": os.environ["PHONE_NUMBER"], + } + ) + bot.register(StylesCommand()) # all contacts and groups bot.start()