fix syntax
This commit is contained in:
@@ -57,12 +57,13 @@ def get_voice_max_duration(context: ContextTypes.DEFAULT_TYPE) -> int:
|
||||
|
||||
|
||||
def command_text(context: ContextTypes.DEFAULT_TYPE) -> str:
|
||||
return " ".join(context.args).strip()
|
||||
return " ".join(context.args or []).strip()
|
||||
|
||||
|
||||
def require_user_id(update: Update) -> int | None:
|
||||
if update.effective_user:
|
||||
return int(update.effective_user.id)
|
||||
user = update.effective_user
|
||||
if user:
|
||||
return int(user.id)
|
||||
return None
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user