You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
__HELP__="""/quote - Get Quotes\n/joke - Get Jokes\n**Lastly:**\n**Press F** replying someone and check Yourself Okay!"""
#Using External Modules like 'pyjokes' and 'quoters'
# ShortCut for Long Codes with Repeating Functions
jokes=pyjokes.get_joke# You can use this when you have to use the same thing over and over again sometimes, Like For Example, pyjokes.get_joke(language="hi", category="neutral"), pyjokes.get_joke(language="en", category="neutral"), Then Instead of writting 'pyjokes.get_joke' you use your pre-defined function 'jokes' in place of that.
@app.on_message(filters.command(["joke"]))
asyncdefcrackjoke(_, message):
joke=jokes(language="en", category="neutral")
awaitmessage.reply_text(joke)
# Simple way for short codes with single use functions
@app.on_message(filters.command(["quote"]))
asyncdefquoter(_, message):
quote=Quote.print()
awaitmessage.reply_text(quote)
# Example Of Simple Regex Use From @SupMeta_Bot
@app.on_message(filters.regex(["(?i)f"]))
asyncdeff(_, message):
if (len(message.text) !=1):
return
ifmessage.reply_to_message:
awaitmessage.reply_to_message.reply_text("**Press F** To Pay Respect to This **LeJhand**", parse_mode="markdown")
else:
awaitmessage.reply_text("Pay Respect to Whom??, Reply to Someone's Message!")