Skip to content

Commit

Permalink
Use markdown for fallen admin
Browse files Browse the repository at this point in the history
  • Loading branch information
andresdelfino committed Jun 27, 2024
1 parent 5e297a6 commit 95c7f6d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/pycamp_bot/commands/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from telegram.ext import CommandHandler
from pycamp_bot.models import Pycampista
from pycamp_bot.logger import logger
from pycamp_bot.utils import escape_markdown


def get_admins_username():
Expand Down Expand Up @@ -84,8 +85,11 @@ async def revoke_admin(update, context):
user = Pycampista.select().where(Pycampista.username == fallen_admin)[0]
user.admin = False
user.save()
await context.bot.send_message(chat_id=chat_id,
text='Un admin ha caido --{}--.'.format(fallen_admin))
await context.bot.send_message(
chat_id=chat_id,
text=f'Un admin ha caído ~{escape_markdown(fallen_admin)}~\\.',
parse_mode='MarkdownV2',
)


async def list_admins(update, context):
Expand Down

0 comments on commit 95c7f6d

Please sign in to comment.