Skip to content

Commit e65d98c

Browse files
committed
Fixing CamelCase to snake_case in CAS function
1 parent edffaf8 commit e65d98c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

tg_bot/modules/welcome.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def send(update, message, keyboard, backup_message):
7777

7878
return msg
7979

80-
def CasBanned(userid):
80+
def cas_banned(userid):
8181
# Query cas
8282
try: # Just in case the CAS api endpoint goes down
8383
response = req.get("https://combot.org/api/cas/check?user_id="+char(userid))
@@ -103,7 +103,7 @@ def new_member(bot: Bot, update: Update):
103103
new_members = update.effective_message.new_chat_members
104104
for new_mem in new_members:
105105
# Check if the user is cas-banned
106-
if not CasBanned(new_mem.id):
106+
if not cas_banned(new_mem.id):
107107
# Give the owner a special welcome
108108
if new_mem.id == OWNER_ID:
109109
update.effective_message.reply_text("È arrivato il capooooo, diamo il via alla festa!")
@@ -166,7 +166,7 @@ def new_member(bot: Bot, update: Update):
166166
user_id = new_mem.id
167167
try:
168168
chat.kick_member(user_id)
169-
bot.send_sticker(chat.id, BAN_STICKER) # banhammer marie sticker
169+
bot.send_sticker(chat.id, BAN_STICKER) # banhammer electus sticker
170170
message.reply_text("BANNATO VIA SISTEMA AUTOMATICO CAS!")
171171
return log
172172

0 commit comments

Comments
 (0)