@@ -107,12 +107,12 @@ def lock(bot: Bot, update: Update, args: List[str]) -> str:
107107 if len (args ) >= 1 :
108108 if args [0 ] in LOCK_TYPES :
109109 sql .update_lock (chat .id , args [0 ], locked = True )
110- message .reply_text ("Locked {} messages for all non-admins !" .format (args [0 ]))
110+ message .reply_text ("Bloccati i messaggi che contengono {} per tutti i non admin !" .format (args [0 ]))
111111
112112 return "<b>{}:</b>" \
113113 "\n #LOCK" \
114114 "\n <b>Admin:</b> {}" \
115- "\n Locked <code>{}</code>." .format (html .escape (chat .title ),
115+ "\n Bloccato <code>{}</code>." .format (html .escape (chat .title ),
116116 mention_html (user .id , user .first_name ), args [0 ])
117117
118118 elif args [0 ] in RESTRICTION_TYPES :
@@ -121,18 +121,17 @@ def lock(bot: Bot, update: Update, args: List[str]) -> str:
121121 members = users_sql .get_chat_members (str (chat .id ))
122122 restr_members (bot , chat .id , members , messages = True , media = True , other = True )
123123
124- message .reply_text ("Locked {} for all non-admins !" .format (args [0 ]))
124+ message .reply_text ("Bloccati i {} per tutti i non admin !" .format (args [0 ]))
125125 return "<b>{}:</b>" \
126126 "\n #LOCK" \
127127 "\n <b>Admin:</b> {}" \
128- "\n Locked <code>{}</code>." .format (html .escape (chat .title ),
128+ "\n Bloccato <code>{}</code>." .format (html .escape (chat .title ),
129129 mention_html (user .id , user .first_name ), args [0 ])
130130
131131 else :
132- message .reply_text ("What are you trying to lock...? Try /locktypes for the list of lockables" )
133-
132+ message .reply_text ("Cosa stai cercando ti bloccare...? Usa /locktypes per la lista degli elementi bloccabili." )
134133 else :
135- message .reply_text ("I'm not an administrator, or haven't got delete rights ." )
134+ message .reply_text ("Non sono un amministratore oppure non ho i permessi di cancellazione ." )
136135
137136 return ""
138137
@@ -148,11 +147,11 @@ def unlock(bot: Bot, update: Update, args: List[str]) -> str:
148147 if len (args ) >= 1 :
149148 if args [0 ] in LOCK_TYPES :
150149 sql .update_lock (chat .id , args [0 ], locked = False )
151- message .reply_text ("Unlocked {} for everyone !" .format (args [0 ]))
150+ message .reply_text ("Sbloccati i messaggi che contengono {} per tutti !" .format (args [0 ]))
152151 return "<b>{}:</b>" \
153152 "\n #UNLOCK" \
154153 "\n <b>Admin:</b> {}" \
155- "\n Unlocked <code>{}</code>." .format (html .escape (chat .title ),
154+ "\n Sbloccato <code>{}</code>." .format (html .escape (chat .title ),
156155 mention_html (user .id , user .first_name ), args [0 ])
157156
158157 elif args [0 ] in RESTRICTION_TYPES :
@@ -179,13 +178,13 @@ def unlock(bot: Bot, update: Update, args: List[str]) -> str:
179178 return "<b>{}:</b>" \
180179 "\n #UNLOCK" \
181180 "\n <b>Admin:</b> {}" \
182- "\n Unlocked <code>{}</code>." .format (html .escape (chat .title ),
181+ "\n Sbloccato <code>{}</code>." .format (html .escape (chat .title ),
183182 mention_html (user .id , user .first_name ), args [0 ])
184183 else :
185- message .reply_text ("What are you trying to unlock ...? Try /locktypes for the list of lockables " )
184+ message .reply_text ("Cosa stai cercando ti sbloccare ...? Usa /locktypes per la lista degli elementi bloccabili. " )
186185
187186 else :
188- bot .sendMessage (chat .id , "What are you trying to unlock ...?" )
187+ bot .sendMessage (chat .id , "Cosa stai cercando ti sbloccare ...?" )
189188
190189 return ""
191190
@@ -203,12 +202,12 @@ def del_lockables(bot: Bot, update: Update):
203202 for new_mem in new_members :
204203 if new_mem .is_bot :
205204 if not is_bot_admin (chat , bot .id ):
206- message .reply_text ("I see a bot, and I've been told to stop them joining ... "
207- "but I'm not admin!" )
205+ message .reply_text ("Vedo un bot, mi è stato detto di non permettergli di unirsi ... "
206+ "ma non sono un admin!" )
208207 return
209208
210209 chat .kick_member (new_mem .id )
211- message .reply_text ("Only admins are allowed to add bots to this chat! Get outta here ." )
210+ message .reply_text ("Solo gli admin sono autorizzati ad aggiungere bot a questo gruppo! Fuori di qui ." )
212211 else :
213212 try :
214213 message .delete ()
@@ -242,9 +241,9 @@ def build_lock_message(chat_id):
242241 locks = sql .get_locks (chat_id )
243242 restr = sql .get_restr (chat_id )
244243 if not (locks or restr ):
245- res = "There are no current locks in this chat ."
244+ res = "Attualmente non ci sono elementi bloccati in questo gruppo ."
246245 else :
247- res = "These are the locks in this chat :"
246+ res = "In questo gruppo questi sono gli elementi bloccati :"
248247 if locks :
249248 res += "\n - sticker = `{}`" \
250249 "\n - audio = `{}`" \
@@ -291,18 +290,18 @@ def __chat_settings__(chat_id, user_id):
291290
292291
293292__help__ = """
294- - /locktypes: a list of possible locktypes
293+ - /locktypes: lista degli elementi bloccabili
295294
296- *Admin only :*
297- - /lock <type>: lock items of a certain type (not available in private )
298- - /unlock <type>: unlock items of a certain type (not available in private )
299- - /locks: the current list of locks in this chat.
295+ *Solo admin :*
296+ - /lock <type>: blocca un elemento di un certo tipo (non diponibile in privato )
297+ - /unlock <type>: sblocca un elemento di un certo tipo (non diponibile in privato )
298+ - /locks: lista degli attuali elementi bloccati
300299
301- Locks can be used to restrict a group's users .
300+ I blocchi possono essere usati per limitare gli utenti di un gruppo .
302301eg:
303- Locking urls will auto-delete all messages with urls, locking stickers will delete all \
304- stickers, etc .
305- Locking bots will stop non-admins from adding bots to the chat .
302+ Bloccare gli url cancellerà automaticamente tutti i messaggi contententi url, \
303+ bloccare gli stickers farà lo stesso con tutti i messaggi di quel tipo, ecc .
304+ Bloccare i bot impedirà ai non admin di aggiungere bot al gruppo .
306305"""
307306
308307__mod_name__ = "Locks"
0 commit comments