@luckydonaldsbots · Post #256 · 08.07.2020 г., 23:11
New feature I forgot to write about, @BanWarnBot will now also notice you if a user which already has gotten warns joins back into your group. #update#BanWarnBot.
Hashtags
TGINSIGHT SIMILAR POSTS
Изворен канал @pythonotes · Post #183 · 23 ное.
Python + bash Если вам часто требуется запускать shell команды из Python-кода, какой способ вы используете? Самый низкоуровневый это функция os.system(), либо os.popen(). Рекомендованный способ это subprocess.call(). Но это всё еще достаточно неудобно. Советую обратить своё внимание на очень крутую библиотеку sh. Что она умеет? 🔸 удобный синтаксис вызова команд как функций # os import os os.system("tar cvf demo.tar ~/") # subprocess import subprocess subprocess.call(['tar', 'cvf', 'demo.tar', '~/']) # sh import sh sh.tar('cvf', 'demo.tar', "~/") 🔸 простое создание функции-алиаса для длинной команды fn = sh.lsof.bake('-i', '-P', '-n') output = sh.grep(fn(), 'LISTEN') в этом примере также задействован пайпинг 🔸 удобный вызов команд от sudo with sh.contrib.sudo: print(ls("/root")) Такой запрос спросит пароль. Чтобы это работало нужно соответствующим способом настроить юзера. А вот вариант с вводом пароля через код. password = "secret" sudo = sh.sudo.bake("-S", _in=password+"\n") print(sudo.ls("/root")) Это не все фишки. Больше интересных примеров смотрите в документации. Специально для Windows💀 юзеров #libs#linux
Пребарај: #banwarnbot
@luckydonaldsbots · Post #256 · 08.07.2020 г., 23:11
New feature I forgot to write about, @BanWarnBot will now also notice you if a user which already has gotten warns joins back into your group. #update#BanWarnBot.
Hashtags
@luckydonaldsbots · Post #138 · 05.07.2018 г., 20:26
Updated @BanWarnBot to no longer kick people when revoking warns. The technical details: Telegrams unbanChatMember API method is actually is a kick+unban, which isn't documented anywhere. It will now check first if the user is not member of the group, being kicked (=banned) or the user left the group (or "was forcefully left by admins"). Else it will not attempting to unban the use as that would kick, too. #update#BanWarnBot
Hashtags
@luckydonaldsbots · Post #133 · 04.07.2018 г., 11:17
@BanWarnBot now allows to revoke warnings by clicking on a button right under it. #update#BanWarnBot
Hashtags
@luckydonaldsbots · Post #300 · 12.11.2025 г., 07:19
Experienced another way how the disk can run full, deleted 100 GB of ancient pending RabbitMQ tasks and set a message TTL as well as a maximum queue length. With that the bots are back online. #JoinCaptchaBot #BanWarnBot
Hashtags
@luckydonaldsbots · Post #299 · 05.06.2024 г., 22:18
Some bots were down again, which was caused by the disk running full. Deleted 460 GB of log files and restored the services. Bots will process all pending updates normally. #JoinCaptchaBot#BanWarnBot
Hashtags
@luckydonaldsbots · Post #252 · 04.07.2020 г., 15:57
@BanWarnBot is nowsuccessfully back up and running the newest version: Here's a list of what's new: New /kick and /ban commands: Just like the /warn one, but immediately removes the user from the chat, either once or permanently. You can specify a reason for why you kicked/banned someone after the command. Those kicks count into the normal warn count, because they are kinda like special warns. Those 3 commands, /warn, /kick and /ban now also allow the first thing after the command to be the id of a user, in the format of #1234, or a user mention. This can come in handy if you don't have a message to reply to. Overhaul of the warning lists: Now the list of /listwarnings and /listallwarnings will link you to the message warn message, if you press the date stamp. Also support for distinguishing automatic kicks/bans and manual kicks/bans has been added. #update#BanWarnBot#resolved
Hashtags
@luckydonaldsbots · Post #251 · 04.07.2020 г., 14:51
Maintenance: Moving @BanWarnBot to the new server. Okey going through the same procedure for @BanWarnBot now, hopefully without the database breaking this time. Turning the bot off for moving the database, so any /warns send in the meantime shouldn't get lost. As soon as it's on the new server it should pick up those, and carry out the needed actions. I'll take @BanWarnBot down in 10 minutes. Other bots should not be affected. #maintenance#downtime#BanWarnBot
Hashtags
@luckydonaldsbots · Post #295 · 15.12.2021 г., 23:01
It was brought to attention that with some bots admin commands were no longer working. That was happining for the bots migrated yesterday, because of the new bot API version. This is #fixed now. Thanks for letting me know, A. A.! #BanWarnBot#RulesRulesBot#JoinCaptchaBot
@luckydonaldsbots · Post #232 · 24.03.2020 г., 10:45
I will soon migrage some services onto a new server. Therefore those services will be unavailable for the next two hours: @JoinCaptchaBot@BanWarnBot@RulesRulesBot and @ForwardWhitelistBot. #downtime #JoinCaptchaBot#BanWarnBot#RulesRulesBot#ForwardWhitelistBot
@luckydonaldsbots · Post #230 · 23.03.2020 г., 11:24
I will definitely work hard to keep the most important group management services stable, including: @JoinCaptchaBot, @RulesRulesBot, @BanWarnBot, and @HeyAdminBot. And for now also the less important @NoServiceBot. #PermalinkBot#NoServiceBot#RulesRulesBot, #BanWarnBot#HeyAdminBot #ongoing#issue