Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
filipre committed Jan 13, 2024
1 parent 0b6b416 commit 3aae2c5
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions example/commands/styles.py
Original file line number Diff line number Diff line change
@@ -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()

0 comments on commit 3aae2c5

Please sign in to comment.