mirror of https://github.com/coddrago/Heroku
Add send_file exception ignore
parent
e54c65f819
commit
c29dad21ea
|
@ -528,8 +528,15 @@ class InlineManager:
|
|||
await m.delete()
|
||||
await r.delete()
|
||||
|
||||
m = await conv.send_file(photo)
|
||||
r = await conv.get_response()
|
||||
try:
|
||||
m = await conv.send_file(photo)
|
||||
r = await conv.get_response()
|
||||
except Exception:
|
||||
# In case user was not able to send photo to
|
||||
# BotFather, it is not a critical issue, so
|
||||
# just ignore it
|
||||
m = await conv.send_message("/cancel")
|
||||
r = await conv.get_response()
|
||||
|
||||
await m.delete()
|
||||
await r.delete()
|
||||
|
|
|
@ -219,9 +219,6 @@ def get_phones(arguments):
|
|||
)
|
||||
|
||||
authtoken = {}
|
||||
|
||||
if arguments.setup:
|
||||
authtoken = {}
|
||||
if arguments.tokens:
|
||||
for token in arguments.tokens:
|
||||
phone = sorted(filter(lambda phone: ":" not in phone, phones.values()))[0]
|
||||
|
@ -595,8 +592,8 @@ async def amain(first, client, allclients, web, arguments):
|
|||
upd = r"Update required" if diff else r"Up-to-date"
|
||||
|
||||
termux = bool(
|
||||
os.popen('echo $PREFIX | grep -o "com.termux"').read()
|
||||
) # skipcq: BAN-B605, BAN-B607
|
||||
os.popen('echo $PREFIX | grep -o "com.termux"').read() # skipcq: BAN-B605, BAN-B607
|
||||
)
|
||||
_platform = "Termux" if termux else "Unknown"
|
||||
|
||||
logo1 = f"""
|
||||
|
|
|
@ -25,7 +25,7 @@ class Strings:
|
|||
self._babel = babel
|
||||
|
||||
def __getitem__(self, key):
|
||||
return self._babel.getkey(self._prefix + key) or self._strings[key]
|
||||
return self._babel.getkey(f"{self._prefix}{key}") or self._strings[key]
|
||||
|
||||
def __call__(self, key, message=None):
|
||||
if isinstance(message, str):
|
||||
|
|
Loading…
Reference in New Issue