1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-23 19:44:20 +00:00

publish: 5.7.1

This commit is contained in:
Steffo 2020-04-09 14:16:28 +02:00
parent 70cb4db200
commit 7f647500b2
3 changed files with 8 additions and 4 deletions

View file

@ -2,7 +2,7 @@
[tool.poetry]
name = "royalpack"
version = "5.7.0"
version = "5.7.1"
description = "A Royalnet command pack for the Royal Games community"
authors = ["Stefano Pigozzi <ste.pigozzi@gmail.com>"]
license = "AGPL-3.0+"

View file

@ -2,6 +2,7 @@ import datetime
import re
import dateparser
import typing
import asyncio
from telegram import Bot as PTBBot
from telegram import Message as PTBMessage
from telegram import InlineKeyboardMarkup as InKM
@ -83,6 +84,8 @@ class MatchmakingCommand(Command):
return text
def _gen_telegram_keyboard(self, mmevent: MMEvent):
if mmevent.datetime <= datetime.datetime.now():
return None
return InKM([
[
InKB(f"{MMChoice.YES.value} Ci sarò!",
@ -130,7 +133,7 @@ class MatchmakingCommand(Command):
mmresponse.choice = choice
await data.session_commit()
await self._update_telegram_mm_message(client, mmevent)
return f"✅ Messaggio ricevuto!"
await data.reply(f"✅ Messaggio ricevuto!")
return callback
@ -252,7 +255,8 @@ class MatchmakingCommand(Command):
disable_webpage_preview=True)
else:
raise UnsupportedError()
# Delete the event message
# Delete the event message after 10 minutes
await asyncio.sleep(600)
if self.interface.name == "telegram":
await self.interface.serf.api_call(client.delete_message,
chat_id=mmevent.interface_data.chat_id,

View file

@ -1 +1 @@
semantic = "5.7.0"
semantic = "5.7.1"