diff --git a/endcord_aemoji.py b/endcord_aemoji.py index 2aaba65..b1e9642 100644 --- a/endcord_aemoji.py +++ b/endcord_aemoji.py @@ -6,7 +6,7 @@ EXT_VERSION = "0.1.0" EXT_ENDCORD_VERSION = "1.4.2" EXT_DESCRIPTION = "View animated custom emoji as GIFs" EXT_SOURCE = "https://git.silvertke.net/SilverTke/endcord-aemoji" -EXT_COMMAND_ASSIST = ("view_aemoji - View animated emoji", "view_aemoji") +EXT_COMMAND_ASSIST = (("view_aemoji - View animated emoji", "view_aemoji"),) EMOJI_RE = re.compile("^<:(.+):(\d+)>$") @@ -23,15 +23,19 @@ class Extension: def __init__(self, app): self.app: Endcord = app - def on_execute_command(self, command_text: str, chat_sel: int, tree_sel: int): + def on_execute_command( + self, command_text: str, chat_sel: int, tree_sel: int + ) -> bool: if command_text.startswith("view_aemoji"): try: emoji = command_text.split(" ")[1] except IndexError: self.app.update_extra_line("Emoji argument not given") - return + return True emoji_url = get_emoji_url(emoji) if emoji_url is None: self.app.update_extra_line("Invalid emoji") - return + return True self.app.download_file(emoji_url, open_media=True) + return True + return False