# █ █ █ █▄▀ ▄▀█ █▀▄▀█ █▀█ █▀█ █ █
# █▀█ █ █ █ █▀█ █ ▀ █ █▄█ █▀▄ █▄█
# 🔒 Licensed under the GNU GPLv3
# 🌐 https://www.gnu.org/licenses/agpl-3.0.html
# 👤 https://t.me/hikamoru
# meta developer: @hikamorumods
# meta banner: https://raw.githubusercontent.com/AmoreForever/assets/master/Funquotes.jpg
__version__ = (1, 0, 0)
from telethon.tl.types import Message
from .. import loader, utils
@loader.tds
class InlineFunMod(loader.Module):
"""Create Fun quotes"""
strings = {
"name": "FunQuotes",
"where_text": "🚫 Provide a text to create sticker with",
"processing": (
"🕔 Processing..."
),
}
strings_ru = {
"where_text": "🚫 Укажи текст для создания стикера",
"processing": (
"🕔 Обработка..."
),
}
async def glaxcmd(self, message: Message):
""" - Create Google search quote"""
text = utils.get_args_raw(message)
if not text:
await message.edit(self.strings("where_text"))
return
await message.edit(self.strings("processing"))
try:
query = await self._client.inline_query("@googlaxbot", text)
await message.respond(file=query[0].document)
except Exception as e:
await utils.answer(message, str(e))
return
if message.out:
await message.delete()
async def twitcmd(self, message: Message):
""" - Create Twitter message quote"""
text = utils.get_args_raw(message)
if not text:
await message.edit(self.strings("where_text"))
return
await message.edit(self.strings("processing"))
try:
query = await self._client.inline_query("@TwitterStatusBot", text)
await message.respond(file=query[0].document)
except Exception as e:
await utils.answer(message, str(e))
return
if message.out:
await message.delete()
async def frogcmd(self, message: Message):
""" - Create Frog text quote"""
text = utils.get_args_raw(message)
if not text:
await message.edit(self.strings("where_text"))
return
await message.edit(self.strings("processing"))
try:
query = await self._client.inline_query("@honka_says_bot", text + ".")
await message.respond(file=query[0].document)
except Exception as e:
await utils.answer(message, str(e))
return
if message.out:
await message.delete()