Skip to content

Commit

Permalink
Merge pull request #101 from andresdelfino/fallen_admin_markdown
Browse files Browse the repository at this point in the history
Use markdown for fallen admin
  • Loading branch information
WinnaZ authored Oct 12, 2024
2 parents 6020071 + 95c7f6d commit e5513c4
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 e5513c4

Please sign in to comment.