diff --git a/discord_bot/__main__.py b/discord_bot/__main__.py index 35e6029..92cce88 100644 --- a/discord_bot/__main__.py +++ b/discord_bot/__main__.py @@ -103,7 +103,8 @@ async def on_message(message): f"You can generate a meme with the syntax\n" f"```\n" f"[template] \"text 1\" \"text 2\" ...\n" - f"```" + f"```\n" + f"I also work with DM to keep your server clean of spam.\n" f"You can find a more detailed help and a list of templates at:\n" f"") return @@ -138,6 +139,10 @@ async def on_message(message): response += f"\n- Aliases: `{'`, `'.join(meme.aliases)}`" if meme.info is not None: response += f"\n- More info: <{meme.info}>" + response += f"\n- Use:" \ + f"\n```{meme.id} \"" + \ + "\" \"".join([f"text {i}" for i in range(meme.texts_len)]) + \ + "\"```" elif not direct: response = f"A meme by {message.author.mention}:" if mid not in SENT: diff --git a/meme_otron/meme_db.py b/meme_otron/meme_db.py index adc97fe..ef178b2 100644 --- a/meme_otron/meme_db.py +++ b/meme_otron/meme_db.py @@ -92,6 +92,7 @@ def load_item(i, item): text.style_ref -= 1 text.update(meme.texts[text.style_ref]) meme.texts += [text] + meme.texts_len = c - 1 except TypeError as e: logger.warning(f"Item '{item_id}'({i + 1}) / Text {j + 1}: {e}") for text in meme.texts: diff --git a/meme_otron/types.py b/meme_otron/types.py index aff049c..fc59c85 100644 --- a/meme_otron/types.py +++ b/meme_otron/types.py @@ -33,6 +33,7 @@ class Meme: self.template = None self.text_base = Text() self.texts = None + self.texts_len = 0 def clone(self): return copy.deepcopy(self)