randydev commited on
Commit
5eaaf71
Β·
1 Parent(s): eefa5fd

fix update

Browse files
akn/AllDownloaderBot/__init__.py CHANGED
@@ -21,6 +21,9 @@ class Translator:
21
  value = value[part]
22
  return value.format(**kwargs)
23
  except KeyError:
24
- return self.get(key, "en", **kwargs)
 
 
 
25
 
26
  transdev = Translator()
 
21
  value = value[part]
22
  return value.format(**kwargs)
23
  except KeyError:
24
+ if lang != "en":
25
+ return self.get(key, "en", **kwargs)
26
+ return f"[Translation missing: {key}]"
27
+
28
 
29
  transdev = Translator()
akn/AllDownloaderBot/admins.py CHANGED
@@ -341,6 +341,8 @@ async def check_user_mute(client: Client, message: Message):
341
  if not bot.can_restrict_members:
342
  return
343
  muted_users = await db.alldl_bot.find_one({"bot_id": client.me.id})
 
 
344
  if muted_users and user in muted_users["mute_user"]:
345
  await client.restrict_chat_member(
346
  message.chat.id,
 
341
  if not bot.can_restrict_members:
342
  return
343
  muted_users = await db.alldl_bot.find_one({"bot_id": client.me.id})
344
+ if not muted_users or "mute_user" not in muted_users:
345
+ return
346
  if muted_users and user in muted_users["mute_user"]:
347
  await client.restrict_chat_member(
348
  message.chat.id,
akn/AllDownloaderBot/langs/ en.yml CHANGED
@@ -1,8 +1,3 @@
1
- buttons:
2
- start: "πŸš€ Start"
3
- help: "❓ Help"
4
- settings: "βš™ Settings"
5
-
6
  messages:
7
  welcome: |
8
  Hi {name} i am a modular group management bot with some fun extras.
@@ -12,9 +7,4 @@ messages:
12
  i can do Azrea Bot of things, and help u manage your group effortlessly!
13
 
14
  All Command can be accessed by using: `/`
15
- **Click on help to learn more!**
16
-
17
- help: |
18
- Available commands:
19
- - /start - Start bot
20
- - /help - Show help
 
 
 
 
 
 
1
  messages:
2
  welcome: |
3
  Hi {name} i am a modular group management bot with some fun extras.
 
7
  i can do Azrea Bot of things, and help u manage your group effortlessly!
8
 
9
  All Command can be accessed by using: `/`
10
+ **Click on help to learn more!**