Skip to content

/kang does not work with animated stickers #57

@KaratekHD

Description

@KaratekHD

Describe the bug
When executing /kang on an animated sticker, the bot will "type" for a short moment, and then nothing happens. It produces the following error in console:

Dec 04 15:21:50 feuerstern startBot.sh[4693]: [2020-12-04 15:21:50,535 | ERROR] No error handlers are registered, logging exception.
Dec 04 15:21:50 feuerstern startBot.sh[4693]: Traceback (most recent call last):
Dec 04 15:21:50 feuerstern startBot.sh[4693]:   File "/home/nemesisbot/Nemesis/tg_bot/modules/stickers.py", line 199, in kang
Dec 04 15:21:50 feuerstern startBot.sh[4693]:     emojis=sticker_emoji,
Dec 04 15:21:50 feuerstern startBot.sh[4693]:   File "<decorator-gen-61>", line 2, in add_sticker_to_set
Dec 04 15:21:50 feuerstern startBot.sh[4693]:   File "/usr/lib/python3.6/site-packages/telegram/bot.py", line 135, in decorator
Dec 04 15:21:50 feuerstern startBot.sh[4693]:     result = func(*args, **kwargs)
Dec 04 15:21:50 feuerstern startBot.sh[4693]:   File "/usr/lib/python3.6/site-packages/telegram/bot.py", line 4124, in add_sticker_to_set
Dec 04 15:21:50 feuerstern startBot.sh[4693]:     result = self._post('addStickerToSet', data, timeout=timeout, api_kwargs=api_kwargs)
Dec 04 15:21:50 feuerstern startBot.sh[4693]:   File "/usr/lib/python3.6/site-packages/telegram/bot.py", line 245, in _post
Dec 04 15:21:50 feuerstern startBot.sh[4693]:     return self.request.post(f'{self.base_url}/{endpoint}', data=data, timeout=timeout)
Dec 04 15:21:50 feuerstern startBot.sh[4693]:   File "/usr/lib/python3.6/site-packages/telegram/utils/request.py", line 347, in post
Dec 04 15:21:50 feuerstern startBot.sh[4693]:     result = self._request_wrapper('POST', url, fields=data, **urlopen_kwargs)
Dec 04 15:21:50 feuerstern startBot.sh[4693]:   File "/usr/lib/python3.6/site-packages/telegram/utils/request.py", line 272, in _request_wrapper
Dec 04 15:21:50 feuerstern startBot.sh[4693]:     raise BadRequest(message)
Dec 04 15:21:50 feuerstern startBot.sh[4693]: telegram.error.BadRequest: Stickerset_invalid
Dec 04 15:21:50 feuerstern startBot.sh[4693]: During handling of the above exception, another exception occurred:
Dec 04 15:21:50 feuerstern startBot.sh[4693]: Traceback (most recent call last):
Dec 04 15:21:50 feuerstern startBot.sh[4693]:   File "/usr/lib/python3.6/site-packages/telegram/utils/promise.py", line 77, in run
Dec 04 15:21:50 feuerstern startBot.sh[4693]:     self._result = self.pooled_function(*self.args, **self.kwargs)
Dec 04 15:21:50 feuerstern startBot.sh[4693]:   File "/home/nemesisbot/Nemesis/tg_bot/modules/helper_funcs/chat_action.py", line 38, in command_func
Dec 04 15:21:50 feuerstern startBot.sh[4693]:     return func(update, context, *args, **kwargs)
Dec 04 15:21:50 feuerstern startBot.sh[4693]:   File "/home/nemesisbot/Nemesis/tg_bot/modules/stickers.py", line 216, in kang
Dec 04 15:21:50 feuerstern startBot.sh[4693]:     tgs_sticker=open("kangsticker.tgs", "rb"),
Dec 04 15:21:50 feuerstern startBot.sh[4693]:   File "/home/nemesisbot/Nemesis/tg_bot/modules/stickers.py", line 367, in makepack_internal
Dec 04 15:21:50 feuerstern startBot.sh[4693]:     emojis=emoji,
Dec 04 15:21:50 feuerstern startBot.sh[4693]: TypeError: create_new_sticker_set() got multiple values for argument 'emojis'

To Reproduce
Steps to reproduce the behavior:

  1. Send an animated sticker
  2. Execute /kang on it

Expected behavior
The bot adds the sticker to your own pack.

Version information (please complete the following information):

  • Device: Linux and Oneplus 6 and more
  • OS: openSUSE Tumbleweed, Android 10, and more
  • Telegram Version : All

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomershelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions