This commit is contained in:
_run 2022-08-13 14:40:20 +05:00
parent 2647a02fc6
commit ffb34da610
2 changed files with 5 additions and 9 deletions

View File

@ -4281,10 +4281,8 @@ class TeleBot:
"""
if contains_masks is not None:
logger.warning('The parameter "contains_masks" is deprecated, use "sticker_type" instead')
if contains_masks:
sticker_type = 'mask'
else:
sticker_type = 'regular'
if sticker_type is None:
sticker_type = 'mask' if contains_masks else 'regular'
return apihelper.create_new_sticker_set(
self.token, user_id, name, title, emojis, png_sticker, tgs_sticker,

View File

@ -5119,11 +5119,9 @@ class AsyncTeleBot:
"""
if contains_masks is not None:
logger.warning('The parameter "contains_masks" is deprecated, use "sticker_type" instead')
if contains_masks:
sticker_type = 'mask'
else:
sticker_type = 'regular'
if sticker_type is None:
sticker_type = 'mask' if contains_masks else 'regular'
return await asyncio_helper.create_new_sticker_set(
self.token, user_id, name, title, emojis, png_sticker, tgs_sticker,
mask_position, webm_sticker, sticker_type)