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 m.delete()
|
||||||
await r.delete()
|
await r.delete()
|
||||||
|
|
||||||
m = await conv.send_file(photo)
|
try:
|
||||||
r = await conv.get_response()
|
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 m.delete()
|
||||||
await r.delete()
|
await r.delete()
|
||||||
|
|
|
@ -219,9 +219,6 @@ def get_phones(arguments):
|
||||||
)
|
)
|
||||||
|
|
||||||
authtoken = {}
|
authtoken = {}
|
||||||
|
|
||||||
if arguments.setup:
|
|
||||||
authtoken = {}
|
|
||||||
if arguments.tokens:
|
if arguments.tokens:
|
||||||
for token in arguments.tokens:
|
for token in arguments.tokens:
|
||||||
phone = sorted(filter(lambda phone: ":" not in phone, phones.values()))[0]
|
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"
|
upd = r"Update required" if diff else r"Up-to-date"
|
||||||
|
|
||||||
termux = bool(
|
termux = bool(
|
||||||
os.popen('echo $PREFIX | grep -o "com.termux"').read()
|
os.popen('echo $PREFIX | grep -o "com.termux"').read() # skipcq: BAN-B605, BAN-B607
|
||||||
) # skipcq: BAN-B605, BAN-B607
|
)
|
||||||
_platform = "Termux" if termux else "Unknown"
|
_platform = "Termux" if termux else "Unknown"
|
||||||
|
|
||||||
logo1 = f"""
|
logo1 = f"""
|
||||||
|
|
|
@ -25,7 +25,7 @@ class Strings:
|
||||||
self._babel = babel
|
self._babel = babel
|
||||||
|
|
||||||
def __getitem__(self, key):
|
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):
|
def __call__(self, key, message=None):
|
||||||
if isinstance(message, str):
|
if isinstance(message, str):
|
||||||
|
|
Loading…
Reference in New Issue